PurchaseOrderInbound (POST)

Overview

This API endpoint is used to create an order asynchronously. It accepts a JSON payload containing details about the order, including document number, line of business, status, error messages, ERP number, subtype, and line information. The endpoint is designed to handle order processing requests and return the results asynchronously.

URL: https://{APIBaseUrl}/leo-order-domaingateway-api/api/v2/Order/processAsync' 

Request
{
    "ReturnValidationErrorObjectFromBpm": "string",
    "billTo": {
        "locationNumber": "string"
    },
    "businessUnit": {
        "entityCode": "string",
        "lobCode": "string"
    },
    "buyerContact": {
        "clientContactCode": "string"
    },
    "changeType": {
        "clientCode": "string"
    },
    "companyCode": {
        "entityCode": "string",
        "lobCode": "string"
    },
    "createdBy": {
        "clientContactCode": "string"
    },
    "cultureDetails": {
        "cultureCode": "string"
    },
    "currency": {
        "code": "string"
    },
    "documentDate": "datetime",
    "documentNumber": "string",
    "documentType": "string",
    "incoTermVersion": {
        "clientCode": "string"
    },
    "legalAddress": {
        "locationNumber": "string"
    },
    "operationType": {
        "clientCode": "string"
    },
    "orderItems": [
        {
            "asnAllowed": "boolean",
            "batchNumber": "string",
            "category": {
                "clientCode": "string"
            },
            "changeType": {
                "clientCode": "string"
            },
            "closedForInvoicing": "boolean",
            "closedForReceipt": "string",
            "contractLineNumber": "string",
            "contractNumber": "string",
            "downPaymentPercentage": "number",
            "downpaymentAmount": "number",
            "expectedValue": "string",
            "holdFlag": "boolean",
            "holdInfo": {
                "holdFlag": "string"
            },
            "incoTermLocation": {
                "clientCode": "string"
            },
            "incoTermVersion": {
                "clientCode": "string"
            },
            "item": {
                "itemNumber": "string"
            },
            "itemType": {
                "clientCode": "string"
            },
            "lineItemNumber": "string",
            "lineSubTotal": "number",
            "lineTotal": "number",
            "lineTotalQuantity": "number",
            "lineType": {
                "clientCode": "string"
            },
            "needByDate": "datetime",
            "operationType": {
                "clientCode": "string"
            },
            "priceBasis": {
                "clientCode": "string"
            },
            "pricePer": "number",
            "pricingBasisUoM": "string",
            "pricingCondition": [
                {
                    "conditionAmount": "string",
                    "conditionPricingUnit": "string",
                    "conditionType": "string",
                    "conditionUoM": "string",
                    "currencyKey": "string"
                }
            ],
            "quantity": "number",
            "receivingToleranceQuantityPercentage": "string",
            "requestSchedules": [
                {
                    "componentMaterial": [
                        {
                            "componentBatchNumber": "string",
                            "componentItem": {
                                "itemNumber": "string",
                                "uom": {
                                    "code": "string"
                                }
                            },
                            "componentLineNumber": "string",
                            "totalRequiredQuantity": "number"
                        },
                        {
                            "componentItem": {
                                "itemNumber": "string",
                                "uom": {
                                    "code": "string"
                                }
                            },
                            "componentLineNumber": "string",
                            "totalRequiredQuantity": "number"
                        }
                    ],
                    "incoTermLocation": {
                        "clientCode": "string"
                    },
                    "incoTermVersion": {
                        "clientCode": "string"
                    },
                    "needByDate": "datetime",
                    "operationType": {
                        "clientCode": "string"
                    },
                    "quantity": "number",
                    "receivingToleranceQuantityPercentage": "string",
                    "receivingTolerances": {
                        "clientCode": "string",
                        "isActive": "string",
                        "isDefault": "string",
                        "tolerances": [
                            {
                                "attributeName": "string",
                                "overTolerance": {
                                    "actualTolerance": "number",
                                    "considerWhicheverIsHigher": "string",
                                    "isToleranceInfinite": "string",
                                    "percentageTolerance": "number"
                                },
                                "underTolerance": {
                                    "actualTolerance": "number",
                                    "considerWhicheverIsHigher": "string",
                                    "isToleranceInfinite": "string",
                                    "percentageTolerance": "number"
                                }
                            }
                        ]
                    },
                    "receivingUnderTolerancePercentage": "string",
                    "requestScheduleItemNumber": "string",
                    "requestScheduleNumber": "number"
                }
            ],
            "servicePlannedEndDate": "datetime",
            "servicePlannedStartDate": "datetime",
            "shipFrom": {
                "locationNumber": "string"
            },
            "shipTo": {
                "addressInfo": {
                    "addressline2": "string",
                    "addressline3": "string",
                    "city": "string",
                    "countryInfo": {
                        "countryCode": "string"
                    },
                    "stateInfo": {
                        "stateAbbrevationCode": "string"
                    },
                    "zipCode": "string"
                },
                "locationName": "string",
                "locationNumber": "string"
            },
            "unitPrice": "number",
            "uom": {
                "code": "string"
            }
        }
    ],
    "paymentTerms": {
        "paymentTermCode": "string"
    },
    "plannerContact": "string",
    "purchaseType": {
        "clientCode": "string"
    },
    "purchasingGroup": "string",
    "purchasingOrg": "string",
    "remitTo": {
        "locationNumber": "string"
    },
    "shipFrom": {
        "locationNumber": "string"
    },
    "subType": "string",
    "supplierDetails": {
        "clientPartnerCode": "string"
    },
    "supplierInterfaceStatus": {
        "clientCode": "string"
    },
    "supplierOrderingLocation": {
        "locationNumber": "string"
    },
    "totalAmount": "number",
    "totalOrderAmount": "number",
    "version": "string"
},
Response
{
    "exception": object,
    "data": object,
    "hasData": boolean,
    "hasException": boolean,
}
Data Elements

Request Body

 

Property

Required?

Data type

Description

Validations / Exceptions

ReturnValidationErrorObjectFromBpm

 

string

Indicates whether to return validation error object from BPM

 

billTo

 

object

Billing information

 

businessUnit

 

object

Business unit information

 

buyerContact

 

object

Buyer contact information

 

changeType

 

object

Change type information

 

companyCode

 

object

Company code information

 

createdBy

 

object

Information about who created the document

 

cultureDetails

 

object

Culture details

 

currency

 

object

Currency information

 

documentDate

 

datetime

Date of the document

 

documentNumber

 

string

Unique identifier for the document

 

documentType

 

string

Type of the document

 

incoTermVersion

 

object

Inco term version information

 

legalAddress

 

object

Legal address information

 

operationType

 

object

Operation type information

 

orderItems

 

array

List of order items

 

paymentTerms

 

object

Payment terms information

 

plannerContact

 

string

Planner contact code

 

purchaseType

 

object

Purchase type information

 

purchasingGroup

 

string

Purchasing group code

 

purchasingOrg

 

string

Purchasing organization code

 

remitTo

 

object

Remittance information

 

shipFrom

 

object

Shipping from information

 

subType

 

string

Subtype of the document

 

supplierDetails

 

object

Supplier details

 

supplierInterfaceStatus

 

object

Supplier interface status information

 

supplierOrderingLocation

 

object

Supplier ordering location information

 

totalAmount

 

number

Total amount

 

totalOrderAmount

 

number

Total order amount

 

version

 

string

Version of the document

 

 

 

billTo

 

Property

Required?

Data type

Description

Validations / Exceptions

locationNumber

 

 string

Location number for billing

 

 

businessUnit

 

Property

Required?

Data type

Description

Validations / Exceptions

entityCode

 

string

Entity code of the business unit

 

lobCode

 

String

Line of business code

 

 

buyerContact 

 

Property

Required?

Data type

Description

Validations / Exceptions

clientContactCode

 

 string

Client contact code for the buyer

 

changeType

 

Property

Required?

Data type

Description

Validations / Exceptions

clientCode

 

 string

Client code for the change type

 

 

companyCode 

 

Property

Required?

Data type

Description

Validations / Exceptions

entityCode

 

string

Entity code of the company

 

lobCode

 

String

Line of business code

 

 

 

orderItems

 

Field

Required

Data Type

Description

Validations / Exceptions

asnAllowed

 

boolean

Indicates if ASN is allowed

 

batchNumber

 

string

Batch number

 

category

 

object

Category information

 

changeType

 

object

Change type information

 

closedForInvoicing

 

boolean

Indicates if closed for invoicing

 

closedForReceipt

 

string

Indicates if closed for receipt

 

contractLineNumber

 

string

Contract line number

 

contractNumber

 

string

Contract number

 

downPaymentPercentage

 

number

Down payment percentage

 

downpaymentAmount

 

number

Down payment amount

 

expectedValue

 

string

Expected value

 

holdFlag

 

boolean

Indicates if hold flag is set

 

holdInfo

 

object

Hold flag information

 

incoTermLocation

 

object

Inco term location information

 

incoTermVersion

 

object

Inco term version information

 

item

 

object

Item information

 

itemType

 

object

Item type information

 

lineItemNumber

 

string

Line item number

 

lineSubTotal

 

number

Line sub-total amount

 

lineTotal

 

number

Line total amount

 

lineTotalQuantity

 

number

Line total quantity

 

lineType

 

object

Line type information

 

needByDate

 

datetime

Need by date

 

operationType

 

object

Operation type information

 

priceBasis

 

object

Price basis information

 

pricePer

 

number

Price per unit

 

pricingBasisUoM

 

string

Pricing basis unit of measure

 

pricingCondition

 

array

List of pricing conditions

 

quantity

 

number

Quantity

 

receivingToleranceQuantityPercentage

 

string

Receiving tolerance quantity percentage

 

requestSchedules

 

array

List of request schedules

 

servicePlannedEndDate

 

datetime

Service planned end date

 

servicePlannedStartDate

 

datetime

Service planned start date

 

shipFrom

 

object

Shipping from information

 

shipTo

 

object

Shipping to information

 

unitPrice

 

number

Unit price

 

uom

 

object

Unit of measure information

 

 

 

category Object

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the category

 

 

 

 

changeType Object

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the change type

 

holdInfo Object

    

Field

Required

Data Type

Description

Validations / Exceptions

holdFlag

 

string

Hold flag information

 

 

incoTermLocation Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the inco term location

 

 

incoTermVersion Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the inco term version

 

 

item Object

    

Field

Required

Data Type

Description

Validations / Exceptions

itemNumber

 

string

Item number

 

 

itemType Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the item type

 

 

lineType Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the line type

 

 

operationType Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the operation type

 

priceBasis Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for the price basis

 

 

 

 

pricingCondition Array

    

Field

Required

Data Type

Description

Validations / Exceptions

conditionAmount

 

string

Condition amount

 

conditionPricingUnit

 

string

Condition pricing unit

 

conditionType

 

string

Condition type

 

conditionUoM

 

string

Condition unit of measure

 

currencyKey

 

string

Currency key

 

 

requestSchedules Array

    

Field

Required

Data Type

Description

Validations / Exceptions

componentMaterial

 

array

List of component materials

 

incoTermLocation

 

object

Inco term location information

 

incoTermVersion

 

object

Inco term version information

 

needByDate

 

datetime

Need by date

 

operationType

 

object

Operation type information

 

quantity

 

number

Quantity

 

receivingToleranceQuantityPercentage

 

string

Receiving tolerance quantity percentage

 

receivingTolerances

 

object

Receiving tolerances information

 

receivingUnderTolerancePercentage

 

string

Receiving under tolerance percentage

 

requestScheduleItemNumber

 

string

Request schedule item number

 

requestScheduleNumber

 

number

Request schedule number

 

 

componentMaterial Array

    

Field

Required

Data Type

Description

Validations / Exceptions

componentBatchNumber

 

string

Component batch number

 

componentItem

 

object

Component item information

 

componentLineNumber

 

string

Component line number

 

totalRequiredQuantity

 

number

Total required quantity

 

 

componentItem Object

    

Field

Required

Data Type

Description

Validations / Exceptions

itemNumber

 

string

Component item number

 

uom

 

object

Unit of measure information

 

 

uom Object

    

Field

Required

Data Type

Description

Validations / Exceptions

code

 

string

Unit of measure code

 

 

receivingTolerances Object

    

Field

Required

Data Type

Description

Validations / Exceptions

clientCode

 

string

Client code for receiving tolerances

 

isActive

 

string

Indicates if active

 

isDefault

 

string

Indicates if default

 

tolerances

 

array

List of tolerances

 

 

tolerances Array

    

Field

Required

Data Type

Description

Validations / Exceptions

attributeName

 

string

Attribute name

 

overTolerance

 

object

Over tolerance information

 

underTolerance

 

object

Under tolerance information

 

 

 

 

overTolerance Object

    

Field

Required

Data Type

Description

Validations / Exceptions

actualTolerance

 

number

Actual over tolerance

 

considerWhicheverIsHigher

 

string

Consider whichever is higher

 

isToleranceInfinite

 

string

Indicates if tolerance is infinite

 

percentageTolerance

 

number

Percentage over tolerance

 

 

 

underTolerance Object

    

Field

Required

Data Type

Description

Validations / Exceptions

actualTolerance

 

number

Actual under tolerance

 

considerWhicheverIsHigher

 

string

Consider whichever is higher

 

isToleranceInfinite

 

string

Indicates if tolerance is infinite

 

percentageTolerance

 

number

Percentage under tolerance

 

 

shipFrom Object

    

Field

Required

Data Type

Description

Validations / Exceptions

locationNumber

 

string

Location number for shipping from

 

 

shipTo Object

    

Field

Required

Data Type

Description

Validations / Exceptions

addressInfo

 

object

Address information

 

locationName

 

string

Location name

 

locationNumber

 

string

Location number

 

 

addressInfo Object

    

Field

Required

Data Type

Description

Validations / Exceptions

addressline2

 

string

Address line 2

 

addressline3

 

string

Address line 3

 

city

 

string

City

 

countryInfo

 

object

Country information

 

stateInfo

 

object

State information

 

zipCode

 

string

Zip code

 

 

countryInfo Object

    

Field

Required

Data Type

Description

Validations / Exceptions

countryCode

 

string

Country code

 

 

stateInfo Object

    

Field

Required

Data Type

Description

Validations / Exceptions

stateAbbrevationCode

 

string

State abbreviation code

 

 

uom Object (Repeated)

    

Field

Required

Data Type

Description

Validations / Exceptions

code

 

string

Unit of measure code

 

 

supplierOrderingLocation Object

    

Field

Required

Data Type

Description

Validations / Exceptions

locationNumber

 

string

Location number for supplier ordering

 

 

 

supplierDetails Object

 

Field

Required

Data Type

Description

Validations / Exceptions

clientPartnerCode

 

string

Client partner code for the supplier

 

 

 

Request Headers

 

Property

Required?

Data type

Description

Validations / Exceptions

Authorization

 

string

Contains the Bearer token for authentication.

 

Content-Type

 

string

Indicates the media type of the response being sent to the server.

 

subtypeAppId

 

string

A unique identifier for the subtype application

 

event

 

string

Represents the command

 

 

 

Response Body

 

Property

Required?

Data type

Description

Validations / Exceptions

exception

 

object

Error details if any

 

data

 

object

Data returned by API

 

hasData

 

boolean

Flag indicating whether response has data

 

hasException

 

boolean

Flag indicating whether response has exception