swagger: "2.0" info: description: "The `order-webhook-client` has been DEPRECATED. Please use the [Webhook Connector](https://docs.tradecloud1.com/connectors/webhook-connector) instead." version: "v2" title: "[DEPRECATED] Tradecloud Order Webhook API" termsOfService: "https://www.tradecloud1.com/en/terms-and-conditions" contact: name: "Tradecloud API support" url: "https://docs.tradecloud1.com/api/introduction/readme/support" email: "support@tradecloud1.com" license: name: "Proprietary" url: "https://www.tradecloud1.com/en/terms-and-conditions" basePath: "/v2" schemes: - "https" paths: /yourcompany.com/any/path/{orderId}: get: tags: - "order-webhook endpoints" summary: "Trigger a GET request to the webhook." description: > If GET requests are configured in your company integration settings, Tradecloud will trigger a request to this address when an order (response) is new or has been changed. parameters: - name: "orderId" in: "path" required: true type: string description: ":orderId will be replaced with the Tradecloud order ID upon triggering the webhook." operationId: "webhookGet" responses: 200: description: "Success" 400: description: "Bad Request. Tradecloud will retry sending the request." 500: description: "Internal Server Error. Tradecloud will retry sending the request." /yourcompany.com/any/path: post: tags: - "order-webhook endpoints" summary: "Trigger a POST request to the webhook." description: > If POST requests are configured in your company integration settings, Tradecloud will trigger a request to this address when an order (response) is new or has been changed. consumes: - "application/json" parameters: - name: "body" in: "body" required: true description: "The request body that is sent to your webhook." schema: $ref: "#/definitions/WebhookBody" operationId: "webhookPost" responses: 200: description: "Success" 400: description: "Bad Request. Tradecloud will retry sending the request." 500: description: "Internal Server Error. Tradecloud will retry sending the request." definitions: BuyerDelivery: type: "object" description: "A delivery line in the delivery schedule or history." required: - "date" - "quantity" properties: position: type: "string" format: "digits" example: "0001" description: "The optional position in the delivery schedule or history. The position is unique and immutable within the schedule." date: type: "string" format: "YYYY-MM-DD" example: "2019-12-31" description: "The mandatory local delivery date of this delivery position. Date has ISO 8601 date format." quantity: type: "number" example: "1234.56" description: "The mandatory quantity of this delivery position. Quantity has a decimal format." BuyerItem: type: "object" description: "The buyer item (or article, goods) to be delivered." required: - "name" - "number" - "purchaseUnitOfMeasureIso" properties: number: type: "string" example: "12345" description: "The mandatory item code or number as known by the buyer. The number is unique and immutable within the buyer scope." revision: type: "string" example: "v2" description: "The optional revision (or version) of this item as known by the buyer." name: type: "string" example: "Round tube ø60x45" description: "The mandatory short name of this item as known by the buyer." description: type: "string" example: "Very nice round tube ø60 x 45" description: "The optionally long description of this item as known by the buyer." purchaseUnitOfMeasureIso: type: "string" format: "ISO 80000-1" example: "PCE" description: "The the 3-letter purchase unit according to ISO 80000-1 which applies to this item." supplierItemNumber: type: "string" example: "67890" description: "The optional item code or number as known by the supplier. Advised in case of wholesale suppliers." dimensions: description: "Array of dimensions related to the item" type: "array" items: $ref: "#/definitions/ItemDimension" BuyerLine: type: "object" description: "A buyer purchase order line contains at least the position, item and delivery schedule." required: - "deliveryHistory" - "deliverySchedule" - "documents" - "item" - "notes" - "position" - "prices" - "properties" properties: position: type: "string" format: "digits" example: "00010" description: "The mandatory position identifier in the purchase order. The position is unique and immutable within the order." row: type: "string" format: "digits" example: "1" description: "An optional row label for this position. Do NOT use row as identifier." description: type: "string" example: "Anything about this line" description: "An optional free format line description or reference added by the buyer." item: $ref: "#/definitions/BuyerItem" itemDetails: $ref: "#/definitions/ItemDetails" deliverySchedule: description: "The planned delivery schedule as requested by the buyer. One or more delivery lines will be provided." type: "array" items: $ref: "#/definitions/BuyerDelivery" deliveryHistory: description: "The historical actual delivery schedule as goods are received at the buyer. Zero, one or more delivery lines will be provided." type: "array" items: $ref: "#/definitions/BuyerDelivery" chargeLines: description: "The charge lines for this order line as known by the buyer." type: "array" items: $ref: "#/definitions/ChargeLine" prices: $ref: "#/definitions/Prices" requests: $ref: "#/definitions/BuyerLineRequests" terms: $ref: "#/definitions/BuyerLineTerms" projectNumber: type: "string" description: "Optional buyer project code or number associated with this line." example: "PROJ12345" productionNumber: type: "string" description: "Optional buyer production code or number associated with this line." example: "PROD12345" salesOrderNumber: type: "string" description: "Optional buyer sales order code or number associated with this line." example: "SO123456789" indicators: $ref: "#/definitions/BuyerLineIndicators" properties: description: "Key-value based custom fields added by the buyer." type: "array" items: $ref: "#/definitions/Property" notes: description: "String based custom fields added by the buyer. \\n are used for a new line." type: "array" items: type: "string" labels: description: "Optional value-added services labels on line level. Please note the practicable number of labels is dependent on the supplier." type: "array" items: type: "string" example: - "first label for this line" - "second label for this line" documents: description: "Order line document references and meta data added by the buyer" type: "array" items: $ref: "#/definitions/Document" certification: $ref: "#/definitions/BuyerLineCertification" customLabels: description: "Optional custom labels on order line level added by buyer, to make supply or quality issues visible." type: "array" items: $ref: "#/definitions/CustomLabel" BuyerLineCertification: type: "object" description: "3th party certification requirements by buyer." properties: typeCode: type: "string" example: "C" description: "Certification Type code" type: type: "string" example: "Class Certificate" description: "Human readable Certification Type" classificationSocietyCode: type: "string" example: "LR" description: "Classification Society code" classificationSociety: type: "string" example: "Lloyd's Register" description: "Human readable Classification Society" BuyerLineDocument: type: "object" description: "Buyer order line data related to an OrderDocumentsEvent" required: - "position" properties: position: type: "string" format: "digits" example: "00010" description: "The mandatory position in the purchase order. The position is unique and immutable within the order." BuyerLineIndicators: type: "object" description: "Order line indicators set by the buyer." properties: noDeliveryExpected: type: "boolean" example: true description: "No goods are expected to be delivered to the buyer." delivered: type: "boolean" example: true description: "All goods are delivered at the buyer." BuyerLineRequests: type: "object" description: "Requests by the buyer." properties: reopenRequest: $ref: "#/definitions/LineReopenRequest" BuyerLineTerms: type: "object" description: "Order line terms set by the buyer." properties: contractNumber: type: "string" example: "123456789" description: "The contract framework code or number associated with this line. The number is unique and immutable within the buyer scope." contractPosition: type: "string" format: "digits" example: "0001" description: "Optional position in the framework contract associated with this line. The position is unique and immutable within the contract." BuyerOrder: type: "object" description: "The buyer side header of the purchase order." required: - "companyId" - "supplierAccountNumber" - "purchaseOrderNumber" - "properties" - "notes" - "documents" - "orderType" properties: companyId: type: "string" format: "uuid" example: "00f03b98-2511-489f-9695-13791b3f66b6" description: "The buyers globally unique Tradecloud company identifier" buyerParty: $ref: "#/definitions/CompanyParty" supplierAccountNumber: type: "string" example: "SUPPLIER12345" description: "The supplier account code or number as known at the buyer." supplierParty: $ref: "#/definitions/CompanyParty" purchaseOrderNumber: type: "string" example: "PO123456789" description: "The purchase order number provided by the buyer. The number is unique and immutable within the buyer scope." description: type: "string" example: "Any custom text about this order" description: "An optional free format order description or reference added by the buyer" destination: $ref: "#/definitions/Location" terms: $ref: "#/definitions/BuyerOrderTerms" properties: description: "Key-value based custom fields added by the buyer." type: "array" items: $ref: "#/definitions/Property" notes: description: "String based custom fields added by the buyer. \\n are used for a new line." type: "array" items: type: "string" labels: description: "Optional value-added services labels on order level. Please note the practicable number of labels is dependent on the supplier." type: "array" items: type: "string" example: - "first label for this order" - "second label for this order" documents: description: "Order line document references and meta data added by the buyer" type: "array" items: $ref: "#/definitions/Document" contact: $ref: "#/definitions/Contact" orderType: $ref: "#/definitions/OrderType" customLabels: description: "Optional custom labels on order level added by buyer, to make supply or quality issues visible." type: "array" items: $ref: "#/definitions/CustomLabel" erpIssueDateTime: type: "string" format: "YYYY-MM-DDThh:mm:ss" example: "2019-12-31T10:11:12" description: "Optional ISO local date and time at which the order was originally issued in the buyers ERP system." erpIssuedBy: $ref: "#/definitions/Contact" erpLastChangeDateTime: type: "string" format: "YYYY-MM-DDThh:mm:ss" example: "2019-12-31T10:11:12" description: "Optional ISO local date and time at which the order was updated in the buyers ERP system." erpLastChangedBy: $ref: "#/definitions/Contact" BuyerOrderDocument: type: object description: "Buyer order data related to an OrderDocumentsEvent" required: - "companyId" - "supplierAccountNumber" - "purchaseOrderNumber" properties: companyId: type: "string" format: "uuid" example: "00f03b98-2511-489f-9695-13791b3f66b6" description: "The mandatory buyers globally unique Tradecloud company identifier" supplierAccountNumber: type: "string" example: "12345" description: "The mandatory supplier account code or number as known at the buyer." purchaseOrderNumber: type: "string" example: "PO123456789" description: "The purchase order number provided by the buyer. The number is unique and immutable within the buyer scope." BuyerOrderTerms: type: "object" description: "The order terms as agreed between buyer and supplier, provided by the buyer." properties: incotermsCode: type: "string" format: "ICC Incoterms 2010" example: "CIF" description: "Optional incoterms code according to ICC Incoterms 2010." incoterms: type: "string" example: "ECT Rotterdam" description: "The incoterms named place (delivery, terminal, port or destination)." paymentTermsCode: type: "string" example: "30D" description: "The payment terms code as provided by the buyer." paymentTerms: type: "string" example: "30 days" description: "The payment terms text as provided by the buyer." ChargeLine: description: "The Charge Line that is included in an order line." type: "object" required: - chargeTypeCode - chargeDescription - quantity - price - priceUnitOfMeasureIso properties: position: type: "string" description: "The position used to identify a Charge Line." example: "001" chargeTypeCode: type: "string" description: "The type code of this Charge Line." example: "CL Type A" chargeDescription: type: "string" description: "The description of this Charge Line." example: "Additional coating" quantity: type: "number" description: "The quantity ordered of this Charge Line" example: 2 price: $ref: "#/definitions/Price" priceUnitOfMeasureIso: type: "string" format: "ISO 80000-1" example: "PCE" description: "The 3-letter price unit according to ISO 80000-1 which applies to the price. The purchase unit and price unit may be different." CompanyParty: type: "object" description: "Includes an unique party identifier and scheme. Without idSchema an accountNumber is assumed." required: - "id" properties: id: type: "string" description: "The identifier for the party" example: "COMPANY-123" idScheme: type: "string" description: "The scheme, providing context to the identifier. Eg. KvK, GLN, etc." example: "KvK" ConfirmedLine: type: "object" description: "The agreed delivery schedule and prices between buyer and supplier. Available when the line has status 'Confirmed'" required: - "deliverySchedule" - "prices" properties: deliverySchedule: description: "The agreed delivery schedule between buyer and supplier. One or more delivery lines will be provided." type: "array" items: $ref: "#/definitions/SupplierDelivery" prices: $ref: "#/definitions/Prices" chargeLines: description: "The confirmed charge lines for this order line." type: "array" items: $ref: "#/definitions/ChargeLine" Contact: type: "object" description: "A buyer or supplier contact." properties: userId: type: "string" format: "uuid" example: "00f03b98-2511-489f-9695-13791b3f66b6" description: "Optional globally unique Tradecloud user identifier." email: type: "string" example: "contact@yourcompany.com" description: "Optional contact email as known in your ERP system." userName: type: "string" example: "username" description: "Optional contact username as known in your ERP system." CustomLabel: description: "Custom label to make supply or quality issues visible." type: "object" required: - "text" properties: text: type: "string" example: "Urgent" description: "Free format label text." reason: type: "string" example: "Out of stock" description: "Free format label reason." DeliveryLine: description: "An aggregated delivery schedule line with logistics info" type: "object" required: - "status" properties: position: type: "string" format: "digits" example: "01" description: "The optional position in the delivery schedule." date: type: "string" format: "YYYY-MM-DD" example: "2019-12-31" description: "The optional delivery local date (without time zone) of this delivery line. Date has ISO 8601 date format." quantity: type: "number" example: 1234.56 description: "The optional quantity of this delivery line. Quantity has a decimal format." status: description: "The optional logistics status of this delivery line." $ref: "#/definitions/LogisticsStatus" etd: type: "string" format: "YYYY-MM-DD" example: "2019-12-31" description: "The optional logistics Estimated Time of Departure local date (without time zone) of this delivery line. Date has ISO 8601 date format." eta: type: "string" format: "YYYY-MM-DD" example: "2019-12-31" description: "The optional logistics Estimated Time of Arrival local date (without time zone) of this delivery line. Date has ISO 8601 date format." Document: type: "object" description: "Either use objectId and the Tradecloud object-storage API or url to download the document." properties: code: type: "string" example: "123456789" description: "Optional document code or number. The code is unique and immutable within a company." revision: type: "string" example: "B" description: "Optional document revision (or version) code or number" name: type: "string" example: "Tradecloud API Manual" description: "Optional document short name" objectId: type: "string" format: "uuid" example: "00f03b98-2511-489f-9695-13791b3f66b6" description: > The globally unique Tradecloud object identifier as known by the [Tradecloud Object Storage](https://swagger-ui.prod.tradecloud1.com/?url=https://api.tradecloud1.com/v2/object-storage/specs.yaml), if this document stored in Tradecloud. url: type: "string" format: "url" example: "https://my-company.com/storage/my_file.pdf" description: "Optional location of the document if is not stored in Tradecloud." type: type: "string" example: "General" description: "Optional type of the attached document. Eg. General, Class Product Certificate, Manual, Packing Instructions, etc..." description: type: "string" example: "General document" description: "Optional description of the attached document." ItemDetails: type: "object" description: "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." properties: countryOfOriginCodeIso2: type: "string" description: "The country of manufacture, production, or growth where an article or product comes from" example: "NL" combinedNomenclatureCode: type: "string" description: "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" example: "6406 10 10" netWeight: type: "number" format: "float" description: "Net weight of one item" example: 41.241 netWeightUnitOfMeasureIso: type: "string" description: "Unit that specifies how much makes up '1' of the measurement" example: "KG" dangerousGoodsCodeUnece: type: "string" description: > UN numbers or UN IDs are four-digit numbers that identify dangerous goods, hazardous substances and articles in the framework of international transport. example: "0060" serialNumber: type: "string" description: "Unique identifier assigned incrementally or sequentially to an item, to uniquely identify it" example: "0x0000000000028000" batchNumber: type: "string" description: "Identification number assigned to a particular quantity or lot of material from a single manufacturer" example: "#18001" ItemDimension: description: "Defines measurable dimensions (length, width, area, weight or volume) of an item" type: "object" required: - "attribute" - "measure" - "unitOfMeasureUnece" properties: attribute: description: "Measurement type of item" type: "string" example: "Length" measure: description: "Measurement value" type: "number" example: 50.5 unitOfMeasureUnece: description: "Measurement dimension type of item" type: string example: "m" LineEventDates: type: "object" description: "Key line event date and times." required: - "issuedAt" properties: issuedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Mandatory ISO date and time, in UTC time zone, at which the order line was issued in Tradecloud." confirmedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time, in UTC time zone, at which the order line became confirmed in Tradecloud." shippedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time, in UTC time zone, at which the order line became shipped in Tradecloud." deliveredAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time, in UTC time zone, at which the order line became delivered in Tradecloud." cancelledAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time, in UTC time zone, at which the order line became cancelled in Tradecloud." completedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time, in UTC time zone, at which the order line became completed in Tradecloud." LineIndicators: type: "object" required: - "deliveryOverdue" properties: deliveryOverdue: type: "boolean" example: true description: "The goods of this line to be delivered are overdue according to the confirmed delivery schedule." LineReopenRequest: type: "object" description: "Alternative delivery schedule and prices proposed by the buyer or supplier, after the order line was confirmed." required: - "deliverySchedule" - "status" properties: prices: $ref: "#/definitions/Prices" deliverySchedule: type: "array" items: $ref: "#/definitions/SupplierDelivery" reason: type: "string" status: $ref: "#/definitions/RequestStatus" LineStatus: type: "object" description: "The line process status and logistics status." required: - "logisticsStatus" - "processStatus" properties: processStatus: $ref: "#/definitions/ProcessStatus" logisticsStatus: $ref: "#/definitions/LogisticsStatus" Location: type: "object" description: "Includes location code and address." required: - "addressLines" - "countryCodeIso2" - "names" properties: code: type: "string" example: "LOC001" description: "Mandatory unique and immutable destination location code or number." names: type: "array" description: "One or more names used to described this location. Can be the company name, location name, department, etc." items: type: "string" example: "Company Name Headquarters" addressLines: type: "array" description: "One or more address lines of this location." items: type: "string" example: "Molengraaffsingel 12" postalCode: type: "string" example: "1234 AB" description: "The postal code of this location." city: type: "string" example: "Delft" description: "The city of this location." countryCodeIso2: type: "string" format: "ISO 3166-1 alpha-2" example: "NL" description: "Mandatory ISO 3166-1 alpha-2 country code of this location." countryName: type: "string" example: "The Netherlands" description: "Optional country name, preferable in English." locationType: type: "string" description: "Optional type of the location, eg. Supplier Premises" example: "Supplier Premises" LogisticsStatus: type: "string" description: > The order, line or delivery line logistics status: * `Open` - No or partial quantity Produced, ReadyToShip, Shipped or Delivered * `Produced` - Full quantity produced by the supplier * `ReadyToShip` - Full quantity ready to be shipped by the supplier * `Shipped` - Full quantity shipped by the supplier * `Delivered` - Full quantity delivered at the buyer enum: - "Open" - "Produced" - "ReadyToShip" - "Shipped" - "Delivered" example: "Open" MessageMeta: type: "object" description: "Includes meta information about this message." required: - "createdDateTime" - "messageId" - "source" properties: messageId: type: "string" format: "uuid" description: "Globally unique Tradecloud identifier of this message." source: $ref: "#/definitions/MessageSource" createdDateTime: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Mandatory ISO date and time, in UTC time zone, at which this message was created." MessageSource: type: "object" description: "Includes meta information about the source of this message." required: - "traceId" properties: traceId: type: "string" format: "uuid" description: "Globally unique Tradecloud trace identifier of this message. All related messages in a flow will have the same tradeId." userId: type: "string" format: "uuid" description: "Globally unique Tradecloud user identifier which triggered the first message in a flow." companyId: type: "string" format: "uuid" description: "Globally unique Tradecloud company identifier which triggered the first message in a flow." Money: type: "object" description: "Mandatory price value and currency fields." required: - "currencyIso" - "value" properties: value: type: "number" example: 1234.56 description: > Mandatory price value has a decimal format. Typically a precision from 2 to 5 decimal digits is used, also depending on the purchase unit quantity. currencyIso: type: "string" format: "ISO 4217" example: "EUR" description: "Mandatory 3-letter currency code according to ISO 4217." OrderDocumentsEvent: type: object description: > Includes the order documents data. Only provided if `eventName` is one of the following: * OrderDocumentsAttachedByBuyer * OrderDocumentsAttachedBySupplier required: - orderId - buyerOrderDocument - supplierOrderDocument - documents - lines - meta properties: orderId: type: string description: "The Tradecloud order ID" example: "eaf0036d-63ec-4292-b4ca-d65df0a912cc" buyerOrderDocument: $ref: '#/definitions/BuyerOrderDocument' supplierOrderDocument: $ref: '#/definitions/SupplierOrderDocument' documents: type: array items: $ref: '#/definitions/Document' description: "The list of attached documents" lines: type: array items: $ref: '#/definitions/OrderLineDocument' description: "A list of lines to which documents were attached." meta: $ref: '#/definitions/MessageMeta' OrderEvent: type: object description: > Includes the order data. Only provided if `eventName` is one of the following: * CompletedOrderLinesRevertedByBuyer * OrderChangesProposalApprovedByBuyer * OrderChangesProposalRejectedByBuyer * OrderChangesProposedBySupplier * OrderContactReassignedByBuyer * OrderContactReassignedBySupplier * OrderCustomLabelsUpdatedByBuyer * OrderCustomLabelsUpdatedBySupplier * OrderIssuedByBuyer * OrderLinesAcceptedBySupplier * OrderLinesCancelledByBuyer * OrderLinesDeliveryScheduleLogisticsUpdatedByBuyer * OrderLinesDeliveryScheduleLogisticsUpdatedBySupplier * OrderLinesIssuedByBuyer * OrderLinesItemDetailsChangedBySupplier * OrderLinesReissuedByBuyer * OrderLinesRejectedBySupplier * OrderLinesReopenRequestApprovedByBuyer * OrderLinesReopenRequestApprovedBySupplier * OrderLinesReopenRequestRejectedByBuyer * OrderLinesReopenRequestRejectedBySupplier * OrderLinesReopenRequestedByBuyer * OrderLinesReopenRequestedBySupplier * OrderLinesUpdatedByBuyer * OrderLinesUpdatedBySupplier * OrderResentByBuyer * OrderResentBySupplier * OrderSynced required: - orderId - buyerOrder - supplierOrder - lines - status - meta properties: orderId: type: string description: "The Tradecloud order ID" example: "eaf0036d-63ec-4292-b4ca-d65df0a912cc" legacyOrderId: type: string description: "The Tradecloud legacy Order ID" buyerOrder: $ref: '#/definitions/BuyerOrder' supplierOrder: $ref: '#/definitions/SupplierOrder' lines: type: array items: $ref: '#/definitions/OrderLine' description: "List of order lines, sorted by buyerLine.position." status: $ref: '#/definitions/OrderStatus' reason: type: "string" description: "Optional reason for this order event." example: "Production schedule changed." indicators: $ref: '#/definitions/OrderIndicators' eventDates: $ref: '#/definitions/OrderEventDates' meta: $ref: '#/definitions/MessageMeta' lastUpdatedAt: type: "string" description: "The ISO-8601 date time (with milliseconds and UTC 'Z' designator) that denotes the latest date time the order has been changed." format: "date-time" example: "2021-04-23T10:01:53.812Z" portalUrl: type: "string" description: "The language independent Tradecloud portal URL of the order." format: "url" example: "https://portal.accp.tradecloud1.com/orders/cb0cef0b-6538-4828-b45e-5ad8ea69b5cd-PO2189" OrderEventDates: type: "object" description: "Key order event date and times." required: - "issuedAt" properties: issuedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Mandatory ISO date and time in, UTC time zone, at which the order was issued in Tradecloud." confirmedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time in, UTC time zone, at which the order became completely confirmed in Tradecloud." shippedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time in, UTC time zone, at which the order became completely shipped in Tradecloud." deliveredAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time in, UTC time zone, at which the order became completely delivered in Tradecloud." cancelledAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time in, UTC time zone, at which the order became completely cancelled in Tradecloud." completedAt: type: "string" format: "YYYY-MM-DDThh:mm:ss.SSSZ" example: "2019-12-31T10:11:12.123Z" description: "Optional ISO date and time in, UTC time zone, at which the order became completely completed in Tradecloud." OrderIndicators: type: "object" required: - "deliveryOverdue" properties: deliveryOverdue: type: "boolean" example: true description: "The goods of this order to be delivered are overdue according to the confirmed delivery schedule." OrderLine: type: "object" description: "Includes the order line data." required: - "id" - "buyerLine" - "supplierLine" - "deliverySchedule" - "indicators" - "status" - "eventDates" properties: id: type: "string" example: "ee99cd3f-c24c-4b60-84ea-8dcf889cc37b-PO012345789-00010" description: "The globally unique Tradecloud order line identifier" buyerLine: $ref: "#/definitions/BuyerLine" supplierLine: $ref: "#/definitions/SupplierLine" confirmedLine: $ref: "#/definitions/ConfirmedLine" deliverySchedule: description: "Aggregated delivery schedule with logistics info" type: "array" items: $ref: "#/definitions/DeliveryLine" indicators: $ref: "#/definitions/LineIndicators" status: $ref: "#/definitions/LineStatus" reason: type: "string" description: "Optional reason for this order line event." example: "Production schedule changed." eventDates: $ref: "#/definitions/LineEventDates" mergedItemDetails: $ref: "#/definitions/ItemDetails" lastUpdatedAt: type: "string" description: "The ISO-8601 date time (with milliseconds and UTC 'Z' designator) that denotes the latest date time the order line has been changed" format: "date-time" example: "2021-04-23T10:01:53.812Z" portalUrl: type: "string" description: "The language independent Tradecloud portal URL of the order line." format: "url" example: "https://portal.accp.tradecloud1.com/orders/cb0cef0b-6538-4828-b45e-5ad8ea69b5cd-PO2189/line/cb0cef0b-6538-4828-b45e-5ad8ea69b5cd-PO2189-10" OrderLineDocument: type: "object" description: "Order line data related to an OrderDocumentsEvent" required: - "orderLineId" - "buyerLineDocument" - "supplierLineDocument" - "documents" properties: orderLineId: type: "string" format: "uuid" example: "ee99cd3f-c24c-4b60-84ea-8dcf889cc37b" description: "The globally unique Tradecloud order line identifier" buyerLineDocument: $ref: '#/definitions/BuyerLineDocument' supplierLineDocument: $ref: '#/definitions/SupplierLineDocument' documents: type: array items: $ref: '#/definitions/Document' OrderStatus: type: "object" description: "The order process status and logistics status." required: - "logisticsStatus" - "processStatus" properties: processStatus: $ref: "#/definitions/ProcessStatus" logisticsStatus: $ref: "#/definitions/LogisticsStatus" OrderType: type: "string" description: > The order type, one of: * `Purchase` - This is a purchase order (default). * `Forecast` - This is a forecast order. enum: - "Purchase" - "Forecast" example: "Purchase" Price: type: "object" description: "A price in the transaction currency, like `CNY` and, if available, a price in your base currency, like `EUR` in the EU." required: - "priceInTransactionCurrency" properties: priceInTransactionCurrency: $ref: "#/definitions/Money" priceInBaseCurrency: $ref: "#/definitions/Money" Prices: type: "object" description: > The gross price, discount percentage and net price. Advised is to use net price only or alternatively gross price together with discount percentage. required: - "priceUnitOfMeasureIso" - "priceUnitQuantity" properties: grossPrice: $ref: "#/definitions/Price" discountPercentage: type: "number" example: 50 description: "The discount percentage. Use together with grossPrice." netPrice: $ref: "#/definitions/Price" priceUnitOfMeasureIso: type: "string" format: "ISO 80000-1" example: "PCE" description: "The 3-letter price unit according to ISO 80000-1 which applies to the price. The purchase unit and price unit may be different." priceUnitQuantity: type: "number" example: 100 description: "The item quantity at which the price applies. Typically this is 1 (unit price) or 100 (the price applies to 100 items)." ProcessStatus: type: "string" description: > The order or line process status: * Issued - (Re)issued by the buyer * InProgress - Under negotiation between buyer and supplier * Confirmed - Agreed between buyer and supplier * Rejected - Rejected by supplier * Completed - Completed at the buyer * Cancelled - Cancelled by either buyer or supplier enum: - "Issued" - "InProgress" - "Confirmed" - "Rejected" - "Completed" - "Cancelled" example: "Issued" Property: type: "object" description: "A key-value based custom field." required: - "key" - "value" properties: key: type: "string" example: "color" description: "The key of the custom field." value: type: "string" example: "red" description: "The value of the custom field. Use \\n for a new line." RequestStatus: type: "string" description: > The line reopen request or proposal status: * Open - Requested by either buyer or supplier. To be approved or rejected by the other party. * Approved - The request is approved by the other party. * Rejected - The request is rejected by the other party. * Closed - The request is closed because it is not relevant anymore. enum: - "Open" - "Approved" - "Rejected" - "Closed" example: "Proposed" SupplierContactStatus: type: "string" enum: - "Suggested" - "Assigned" - "Reassigned" SupplierDelivery: type: "object" description: "A delivery line in the proposed or confirmed delivery schedule." properties: position: type: "string" format: "digits" example: "0001" description: "Required position in the delivery schedule. The position is unique and immutable within the schedule." date: type: "string" format: "YYYY-MM-DD" example: "2019-12-31" description: "Required local delivery date of this delivery position. Date has ISO 8601 date format." quantity: type: "number" example: "1234.56" description: "Required quantity of this delivery position. Quantity has a decimal format." SupplierLine: type: "object" description: "A supplier side order line may contain sales order number and position and a proposal." required: - "documents" - "notes" - "properties" properties: salesOrderNumber: type: "string" description: "Optional supplier sales order code or number associated with this line. The number is unique and immutable within the supplier scope." example: "SO123456789" salesOrderLinePosition: type: "string" description: "Optional supplier sales order line position associated with this line. The position is unique and immutable within the sales order." example: "00010" description: type: "string" example: "Anything about this line" description: "An optional free format line description or reference added by the supplier." itemDetails: $ref: "#/definitions/ItemDetails" chargeLines: description: "The charge lines for this order line as known by the supplier." type: "array" items: $ref: "#/definitions/ChargeLine" requests: $ref: "#/definitions/SupplierLineRequests" properties: type: "array" description: "Key-value based custom fields added by the supplier." items: $ref: "#/definitions/Property" notes: description: "String based custom fields added by the supplier. \\n are used for a new line." type: "array" items: type: "string" documents: description: "Order line document references and meta data added by the supplier" type: "array" items: $ref: "#/definitions/Document" customLabels: description: "Optional custom labels on order line level added by supplier, to make supply or quality issues visible." type: "array" items: $ref: "#/definitions/CustomLabel" SupplierLineDocument: type: object description: "Supplier order line data related to an OrderDocumentsEvent" properties: salesOrderNumber: type: string description: "Optional supplier sales order code or number associated with this line. The number is unique and immutable within the supplier scope." example: "SO123456789" salesOrderLinePosition: type: string example: "00020" description: "Optional supplier sales order line position associated with this line. The position is unique and immutable within the sales order." SupplierLineProposal: type: "object" description: "Alternative delivery schedule and prices proposed by the supplier." required: - "deliverySchedule" - "prices" - "status" properties: deliverySchedule: type: "array" description: "Alternative delivery schedule proposed by the supplier." items: $ref: "#/definitions/SupplierDelivery" prices: $ref: "#/definitions/Prices" chargeLines: description: "The charge lines for this order line as proposed by the supplier." type: "array" items: $ref: "#/definitions/ChargeLine" reason: type: "string" description: "Optional reason for this proposal provided by the supplier." example: "Out of stock" status: $ref: "#/definitions/RequestStatus" SupplierLineRequests: type: "object" description: "Requests by the supplier." properties: proposal: $ref: "#/definitions/SupplierLineProposal" reopenRequest: $ref: "#/definitions/LineReopenRequest" SupplierContact: type: "object" description: "Supplier contact information." properties: userId: type: "string" format: "uuid" example: "d024bf02-7e33-427b-b4f5-a10a61761711" description: "User ID." email: type: "string" example: "user@example.com" description: "Email address." userName: type: "string" example: "user" description: "Username." status: $ref: "#/definitions/SupplierContactStatus" SupplierOrder: type: "object" description: "The supplier side header of the purchase order." required: - "companyId" - "properties" - "notes" - "documents" properties: companyId: type: "string" format: "uuid" example: "d024bf02-7e33-427b-b4f5-a10a61761711" description: "The suppliers globally unique Tradecloud company identifier" buyerAccountNumber: type: "string" example: "BUYER12345" description: "The buyer account code or number as known at the supplier." description: type: "string" example: "Any custom text about this order" description: "An optional free format order description or reference added by the supplier" properties: type: "array" description: "Key-value based custom fields added by the supplier." items: $ref: "#/definitions/Property" notes: description: "String based custom fields added by the supplier. \\n are used for a new line." type: "array" items: type: "string" documents: description: "Order document references and meta data added by the supplier" type: "array" items: $ref: "#/definitions/Document" contact: $ref: "#/definitions/SupplierContact" customLabels: description: "Optional custom labels on order level added by supplier, to make supply or quality issues visible." type: "array" items: $ref: "#/definitions/CustomLabel" erpLastResponseDateTime: type: "string" format: "YYYY-MM-DDThh:mm:ss" example: "2019-12-31T10:11:12" description: "ISO local date and time at which the order response was updated in suppliers ERP system." erpLastRespondedBy: $ref: "#/definitions/Contact" SupplierOrderDocument: type: object description: "Supplier order data related to an OrderDocumentsEvent" required: - "companyId" properties: companyId: type: "string" format: "uuid" example: "d024bf02-7e33-427b-b4f5-a10a61761711" description: "The mandatory suppliers globally unique Tradecloud company identifier" buyerAccountNumber: type: "string" example: "BUYER12345" description: "The buyer account code or number as known at the supplier." WebhookBody: type: object required: - eventName properties: eventName: type: string description: > The name of the event that is included in this request. For buyer/supplier it could be one one of the following: * CompletedOrderLinesRevertedByBuyer * OrderChangesProposalApprovedByBuyer * OrderChangesProposalRejectedByBuyer * OrderChangesProposedBySupplier * OrderContactReassignedByBuyer * OrderContactReassignedBySupplier * OrderCustomLabelsUpdatedByBuyer * OrderCustomLabelsUpdatedBySupplier * OrderDocumentsAttachedByBuyer * OrderDocumentsAttachedBySupplier * OrderIssuedByBuyer * OrderLinesAcceptedBySupplier * OrderLinesCancelledByBuyer * OrderLinesDeliveryScheduleLogisticsUpdatedByBuyer * OrderLinesDeliveryScheduleLogisticsUpdatedBySupplier * OrderLinesIssuedByBuyer * OrderLinesItemDetailsChangedBySupplier * OrderLinesReissuedByBuyer * OrderLinesRejectedBySupplier * OrderLinesReopenRequestApprovedByBuyer * OrderLinesReopenRequestApprovedBySupplier * OrderLinesReopenRequestRejectedByBuyer * OrderLinesReopenRequestRejectedBySupplier * OrderLinesReopenRequestedByBuyer * OrderLinesReopenRequestedBySupplier * OrderLinesUpdatedByBuyer * OrderLinesUpdatedBySupplier * OrderResentByBuyer * OrderResentBySupplier * OrderSynced example: "OrderLinesAcceptedBySupplier" orderEvent: $ref: '#/definitions/OrderEvent' orderDocumentsEvent: $ref: "#/definitions/OrderDocumentsEvent"