Giter Club home page Giter Club logo

available-to-promise's Introduction

available-to-proimse

Available to Promise refers to the capability to determine the quantity of a product that can be promised to a customer at a specific point in time based on the current inventory levels, existing orders, and any other constraints or factors affecting availability.

Key Components

  1. ATP Rules and Conditions: Establishing rules and conditions that dictate how threshold, safety stock and shipping should be handled for a product in a facility based on various factors such as tags, product features etc.
  2. ATP Rule Groups: Organizing rules into groups, allowing for better execution of one rule set e.g. setting threshold, safety stock or shipping for all the matching products.

Effective managing of threshold, safety stocks, shipping etc. contributes to managing product atp more accurately.

Login Instructions

This document provides instructions on how to authenticate using the login API and how to use the received credentials for subsequent API calls.

Logging In

  1. Endpoint: To log in, make a POST request to the following endpoint: http://localhost:8080/rest/login.

  2. Request Format: The request should be made with the Content-Type header set to application/x-www-form-urlencoded. The body of the request must include the following parameters:

    • username: Your username.
    • password: Your password.

    Example using curl:

    curl -X POST http://localhost:8080/rest/login \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'username=YOUR_USERNAME&password=YOUR_PASSWORD'
    

Successful Response: Upon successful authentication, the API will return the following JSON response:

{
  "loggedIn": true
}

Retrieving the CSRF Token and Cookie

  • CSRF Token: The response will include an X-CSRF-Token in the headers. This token is required for making subsequent API calls.
  • Cookie: The response also sets a session cookie. Ensure that your HTTP client is configured to store and use cookies for subsequent requests.

Example of extracting the CSRF token using curl

Assuming the use of a tool like jq to parse JSON:

csrf_token=$(curl -c cookie.txt -X POST http://localhost:8080/rest/login \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=YOUR_USERNAME&password=YOUR_PASSWORD' \
-i | grep 'X-CSRF-Token' | cut -d ' ' -f2)

Making Authenticated API Calls

For all subsequent API calls after login:

  • Include the X-CSRF-Token in the request headers.
  • Ensure that the session cookie received during the login process is included with the request.

Example using curl

curl -X GET http://localhost:8080/rest/someEndpoint \
-H 'X-CSRF-Token: YOUR_CSRF_TOKEN' \
-b cookie.txt

Note: Replace YOUR_USERNAME, YOUR_PASSWORD, and YOUR_CSRF_TOKEN with your actual username, password, and CSRF token, respectively. The method of extracting the CSRF token may vary depending on the tools and programming language you are using. The provided examples use common command-line tools.

available-to-promise's People

Contributors

ravilodhi avatar dixitdeepak avatar

Watchers

Anil K Patel avatar Jacopo Cappellato avatar Mridul Pathak avatar  avatar  avatar  avatar  avatar Aman Singh Bais avatar  avatar

available-to-promise's Issues

Available To Promise base implementation

What are the acceptance criteria?

  1. Tables should be there for managing rules, conditions, actions and rule group runs.
  2. Seed data should be there for statuses, and types used.
  3. APIs to perform CRUD operations on rule group and related objects.
  4. Threshold services to prepare product threshold.
  • ...

Can you complete this feature request by yourself?

  • YES
  • NO

Additional information

UI - https://www.figma.com/file/bVPRRw282CqGKMdbz7dciH/HC-Ionic-design-system?type=design&node-id=34317-190810&mode=design&t=PJEG8PVsaBSlWqs6-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.