Skip to content

Send order response

POST
/api-connector/order-response
curl --request POST \
--url https://api.tradecloud1.com/v2/api-connector/order-response \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "order": { "companyId": "00f03b98-2511-489f-9695-13791b3f66b6", "buyerAccountNumber": "12345", "purchaseOrderNumber": "PO123456789", "description": "Any custom text about this order", "indicators": { "accepted": false, "rejected": false }, "properties": [ { "key": "color", "value": "red" } ], "documents": [ { "code": "123456789", "revision": "B", "name": "Tradecloud API Manual", "objectId": "00f03b98-2511-489f-9695-13791b3f66b6", "url": "https://my-company.com/storage/my_file.pdf", "type": "General", "description": "General document" } ], "notes": [ "one note", "another note" ], "contact": { "email": "contact@yourcompany.com" } }, "lines": [ { "purchaseOrderLinePosition": "0001", "salesOrderNumber": "SO123456789", "salesOrderLinePosition": "0001", "description": "Anything about this line", "itemDetails": { "countryOfOriginCodeIso2": "NL", "combinedNomenclatureCode": "6406 10 10", "netWeight": 41.241, "netWeightUnitOfMeasureIso": "KG", "dangerousGoodsCodeUnece": "0060", "serialNumber": "0x0000000000028000", "batchNumber": "#18001" }, "deliverySchedule": [ { "position": "01", "date": "2019-12-31", "quantity": 1234.56 } ], "chargeLines": [ { "position": "001", "chargeTypeCode": "FC", "chargeDescription": "Additional coating", "quantity": 2, "price": { "priceInTransactionCurrency": { "value": 1234.56, "currencyIso": "EUR" }, "priceInBaseCurrency": { "value": 1234.56, "currencyIso": "EUR" } }, "priceUnitOfMeasureIso": "PCE" } ], "prices": { "grossPrice": { "priceInTransactionCurrency": { "value": 1234.56, "currencyIso": "EUR" }, "priceInBaseCurrency": { "value": 1234.56, "currencyIso": "EUR" } }, "discountPercentage": 50, "netPrice": { "priceInTransactionCurrency": { "value": 1234.56, "currencyIso": "EUR" }, "priceInBaseCurrency": { "value": 1234.56, "currencyIso": "EUR" } }, "priceUnitOfMeasureIso": "PCE", "priceUnitQuantity": 100 }, "indicators": { "accepted": false, "rejected": false }, "properties": [ { "key": "color", "value": "red" } ], "documents": [ { "code": "123456789", "revision": "B", "name": "Tradecloud API Manual", "objectId": "00f03b98-2511-489f-9695-13791b3f66b6", "url": "https://my-company.com/storage/my_file.pdf", "type": "General", "description": "General document" } ], "notes": [ "one note", "another note" ], "reason": "Out of stock." } ], "erpResponseDateTime": "2019-12-31T10:11:12", "erpRespondedBy": { "email": "contact@yourcompany.com" } }'

Send an order response by the supplier. Requires Integration role

Send order response by supplier

object
order
required

The header of the purchase order response.

object
companyId

The optional Tradecloud company ID of the supplier. Only needed when the integration user is authorized for multiple companies.

string format: uuid

Example

00f03b98-2511-489f-9695-13791b3f66b6
buyerAccountNumber
required

The buyer account code or number as known in your ERP system and added to the buyer connection in the Tradecloud portal.

string

Example

12345
purchaseOrderNumber
required

The purchase order number as provided by the buyer.

string

Example

PO123456789
description

An free format order description or reference

string

Example

Any custom text about this order
indicators

The provided order line positions in the order response are accepted or rejected by the supplier. These indicators have precedence over responded delivery schedule and prices.

object
accepted

The provided purchase order line positions are accepted by the supplier.

boolean

Example

false
rejected

The provided purchase order line positions are rejected by the supplier.

boolean

Example

false
properties

Key-value based custom fields. Properties are optional.

Array<object>

A key-value based custom field.

object
key
required

The key of the custom field.

string

Example

color
value
required

The value of the custom field. Use \n for a new line.

string

Example

red
documents

Document references and meta data. The total number of documents is limited to 100 documents per supplier order header. If a document has the same code as an existing supplier order header document, the original supplier order header document is overwritten. Otherwise, the newly attached document is appended.

Array<object>

Either use the Tradecloud object-storage API to upload your document, or your company’s content server, or provide only document meta data.

object
code

Document code or number. The document code should be unique within your company and immutable.

string

Example

123456789
revision

Document revision (or version) code or number

string

Example

B
name

Document short name

string

Example

Tradecloud API Manual
objectId

Tradecloud object identifier which was returned by the Tradecloud object-storage API upload

string format: uuid

Example

00f03b98-2511-489f-9695-13791b3f66b6
url

Location of the document if is not stored in Tradecloud.

string format: url

Example

https://my-company.com/storage/my_file.pdf
type

The type of the attached document. Eg. General, Class Product Certificate, Manual, Packing Instructions, etc…

string

Example

General
description

Description of the attached document.

string

Example

General document
notes

String based custom fields. Use \n for a new line. Notes are optional.

Array<string>

Example

[
"one note",
"another note"
]
contact

The employee who is responsible for or who added, updated or responded to this order.

object
email

Employee email as known in Tradecloud.

string format: email

Example

contact@yourcompany.com
lines

The lines of the purchase order response. You only have to send the lines which are new or updated.

Array<object>

A purchase order response line.

object
purchaseOrderLinePosition
required

Required position in the purchase order as provided by the buyer.

string format: digits

Example

0001
salesOrderNumber

Supplier sales order code or number associated with this line.

string

Example

SO123456789
salesOrderLinePosition

Supplier sales order position associated with this line.

string format: digits

Example

0001
description

An free format line description or reference.

string

Example

Anything about this line
itemDetails

The buyer may send item details to inform the supplier about part information. The supplier may check, change and add item details if they are not correct or incomplete.

object
countryOfOriginCodeIso2

The country of manufacture, production, or growth where an article or product comes from

string

Example

NL
combinedNomenclatureCode

A tool for classifying goods, set up to meet the requirements both of the Common Customs Tariff and of the EU’s external trade statistics

string

Example

6406 10 10
netWeight

Net weight of one item

number format: float

Example

41.241
netWeightUnitOfMeasureIso

The net weight unit of measure, passed through as-is. Mandatory when netWeight is provided. No standard is enforced; UN/ECE Recommendation N°20 (Codes for Units of Measure) is recommended if you want a standard.

string

Example

KG
dangerousGoodsCodeUnece

UN numbers or UN IDs are four-digit numbers that identify dangerous goods, hazardous substances and articles in the framework of international transport

string

Example

0060
serialNumber

Unique identifier assigned incrementally or sequentially to an item, to uniquely identify it

string

Example

0x0000000000028000
batchNumber

Identification number assigned to a particular quantity or lot of material from a single manufacturer

string

Example

#18001
deliverySchedule

The confirmed planned delivery schedule by the supplier. Provide one or more delivery schedule lines. The total number of delivery schedule lines is limited to 100 lines per order line.

Array<object>

A confirmed delivery line in the delivery schedule.

object
position

Position in the delivery schedule. The position should be unique within the schedule and immutable. If an empty string is provided, null is used instead.

string format: digits

Example

01
date

Confirmed delivery date of this delivery position. Leave empty if the date is yet unknown. Date has ISO 8601 date format.

string format: YYYY-MM-DD

Example

2019-12-31
quantity

Confirmed quantity of this delivery position. Leave empty if the quantity is yet unknown. Quantity has a decimal format.

number

Example

1234.56
chargeLines

Deprecated: Use lineType with value ‘Charge’ and chargeReasonCode on the order line instead. The confirmed charge lines for this order line.

Array<object>

Deprecated: Use lineType with value ‘Charge’ and chargeReasonCode on the order line instead. The Charge Line that is included in an order line.

object
position

The position used to identify a Charge Line.

string

Example

001
chargeTypeCode
required

The reason code of this Charge Line.

string format: UNCL7161

Example

FC
chargeDescription
required

The description of this Charge Line.

string

Example

Additional coating
quantity
required

The quantity ordered of this Charge Line

number

Example

2
price
required

Provide a price in the transaction currency of the supplier, like CNY in China. If available provide a price in your base currency, like EUR in the EU.

object
priceInTransactionCurrency
required

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
priceInBaseCurrency

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
priceUnitOfMeasureIso
required

The price unit of measure, passed through as-is. No standard is enforced; UN/ECE Recommendation N°20 is recommended if you want a standard. The purchase unit and price unit may be different.

string

Example

PCE
prices

Prices as provided by the supplier. Advised is to provide only netPrice or alternatively grossPrice together with discountPercentage.

object
grossPrice

Provide a price in the transaction currency of the supplier, like CNY in China. If available provide a price in your base currency, like EUR in the EU.

object
priceInTransactionCurrency
required

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
priceInBaseCurrency

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
discountPercentage

The discount percentage. Use together with grossPrice.

number

Example

50
netPrice

Provide a price in the transaction currency of the supplier, like CNY in China. If available provide a price in your base currency, like EUR in the EU.

object
priceInTransactionCurrency
required

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
priceInBaseCurrency

Price value and currency fields.

object
value
required

Price value has a decimal format with any number of digits.

number

Example

1234.56
currencyIso
required

3-Letter currency code according to ISO 4217.

string format: ISO 4217

Example

EUR
priceUnitOfMeasureIso

The price unit of measure, passed through as-is. No standard is enforced; UN/ECE Recommendation N°20 is recommended if you want a standard. The purchase unit and price unit may be different. When left empty, the price unit of the buyer is applied.

string

Example

PCE
priceUnitQuantity

The item quantity at which the price applies. Typically this is 1 (unit price) or 100 (the price applies to 100 items). This number must be greater than 0. When left empty, the price unit of the buyer is applied.

number

Example

100
indicators

This order line position in the order response is accepted or rejected by the supplier. These indicators have precedence over responded delivery schedule and prices and order header indicators.

object
accepted

This purchase order line position is accepted by the supplier.

boolean

Example

false
rejected

This purchase order line position is rejected by the supplier.

boolean

Example

false
properties

Key-value based custom fields. Properties are optional.

Array<object>

A key-value based custom field.

object
key
required

The key of the custom field.

string

Example

color
value
required

The value of the custom field. Use \n for a new line.

string

Example

red
documents

Document references and meta data. The total number of documents is limited to 100 documents per order line. If a document has the same code as an existing order line document, the original order line document is overwritten. Otherwise, the newly attached document is appended.

Array<object>

Either use the Tradecloud object-storage API to upload your document, or your company’s content server, or provide only document meta data.

object
code

Document code or number. The document code should be unique within your company and immutable.

string

Example

123456789
revision

Document revision (or version) code or number

string

Example

B
name

Document short name

string

Example

Tradecloud API Manual
objectId

Tradecloud object identifier which was returned by the Tradecloud object-storage API upload

string format: uuid

Example

00f03b98-2511-489f-9695-13791b3f66b6
url

Location of the document if is not stored in Tradecloud.

string format: url

Example

https://my-company.com/storage/my_file.pdf
type

The type of the attached document. Eg. General, Class Product Certificate, Manual, Packing Instructions, etc…

string

Example

General
description

Description of the attached document.

string

Example

General document
notes

String based custom fields. Use \n for a new line. Notes are optional.

Array<string>

Example

[
"one note",
"another note"
]
reason

Optional reason for an accepted, rejected, reopened or cancelled order line.

string

Example

Out of stock.
erpResponseDateTime

ISO local date and time at which the order was responded in your ERP system.

string format: YYYY-MM-DDThh:mm:ss

Example

2019-12-31T10:11:12
erpRespondedBy

The employee who is responsible for or who added, updated or responded to this order.

object
email

Employee email as known in Tradecloud.

string format: email

Example

contact@yourcompany.com

Successfully verified and sent order response.

Successfully queued order response. Order response has not yet been verified.

Bad request, the user should check the response body for more info.

Media type*/*
object
code
required
string

Example

missing.property
message
required
string

Example

Property X was missing

Not authenticated, the user should authenticate using a valid access token, use Basic Authentication, or refresh to get a valid token. May or may not contain a structured response body

Media type*/*
object
message
required
string

Example

Authentication failed
attemptsLeft

The number of authentication attempts left before the user is banned. Applicable when authentication through Basic Authentication fails.

integer

Example

2
banned

Int describing the number of seconds left before the user is allowed to attempt a login with Basic Authentication again.

integer

Example

300

Not authorized, the user is authenticated but does not have the necessary permission.

Media type*/*
object
message
required
string

Example

Not authorized for this action

Either buyer or order not found.

An unexpected error occurred, Tradecloud ops will be alerted. May or may not contain a structured response body.

Media type*/*
object
code
required
string

Example

some.error
message
required
string

Example

Some error occurred
cause

The cause of this error. Free-format JSON object.

object

Service is not healthy (bad gateway), Tradecloud ops will be alerted. Will not contain a structured response body.

Service is unavailable (overloaded or down for maintenance), Tradecloud ops will be alerted. May or may not contain a structured response body.

Media type*/*
object
message
required
string

Example

Could not retrieve data from external source.

Service is unavailable (gateway timeout), Tradecloud ops will be alerted. Will not contain a structured response body.