1. Home
  2. ERPAG
  3. API Script
  4. Add Work Order

Add Work Order

By calling the URL endpoint with the POST method, this endpoint returns a JSON object with new created Work Order ID and Work Order Number.

Example:

Post the JSON object in body request for the work order whose JSON looks like sample below (call URL https://api.erpag.com/workorder/add?additem=true with POST method and JSON body).

When sending a request, it is possible to send the additem parameter through the request URL. The parameter additem=true enables the automatic creation of an Item if it does not exist. If the parameters are not defined, the API will check Item existence and return an error with the message that the Item was not found.

Body JSON sample:

Explanation:

  • description – Description of Work Order (optional)
  • tag – Work Order Tag (optional)
  • input_items – array of work order input line items (material)
  • output_items – array of work order output line items (finished goods)
  • Input and Output Items:
  • id – The Item ID (optional)
  • sku – The Item SKU number (optional)
  • description – Item Description/Name (mandatory)
  • uom – Unit of measure (optional)
  • qty – line item quantity (mandatory)
  • price – line item price (mandatory)

Result:

Explanation:

id – ID of created Work Order
number – Work Order Number


Note: Access to this API endpoint is allowed only for selected API User account using the API key and API password in the request header with the key name “Authorization” and key value “Basic base64encoded(api_key:api_password)“, or URL parameters ApiKey and ApiSecret for example https://api.erpag.com/item/add?ApiKey=key_056a9spfg1qubg34e409ee233d&ApiSecret=sec_IKJ4Sc2G8jHfr3sHbxQwEfev-Az-1YaF

How can we help?