Direct orders
Here is a guideline to synchronize order with Hubble in the specific contectx of direct orders.
Direct orders are defined with the following characteristics:
- are shipped from factory/suppliers to customers/distribution centers.
- doesn't serve on stock
- are destinated to export
- use sea freight
Orders (v3.28.0)
Direct orders can be created or updated through Orders API endpoint: /api/sales-orders/
For complete definition of /sales-orders/ endpoint please visit here.
Note: this API is used for multiple purposes, if necessary please visit other guidelines on best practices for other purposes.
Create new Order
Create a new order in Hubble.
The required fields below are not technically required, but functionally required by this guideline.
Request Body schema:
The new SalesOrder resource
object or null Additional data if necessary for a specific business usage. Data has to be posted in JSON format. Please contact the team if you would like to use it | |
object Company to which the order has to be billed to. The connection will be created on the fly if not existing in master data | |
| cargoReadyDate required | string or null <date-time> Date when the cargo is planned to be ready |
| comment | string or null Comment to be treated by Forwarder during operations |
| company required | integer Id of your company in Hubble. Please contact the team to get the value. |
required | object Forwarding company used at destination |
| department | string or null Purchasing department / product category for this order |
| dueAt required | string or null <date-time> Estimated time of departure (ETD) |
| externalOrderNumber | string or null Final customer order number, if any |
required | object Order incoterm |
| incotermPlace | string or null Place where the incoterm takes effect |
| issuedAt | string or null <date-time> Date when the order has been officially issued (if different from current date) |
required | object Main transportation mode: for sea freight: SEA |
| operationCode | string or null Promotional operation code linked this order, if any |
| operationName | string or null Promotional operation name linked this order, if any |
required | object Forwarding company used at origin |
| orderNumber required | string or null Main order number |
| paymentTerms | string or null Payment terms for this order |
required | object Port of loading (POL) |
required | object Port of discharge (POD) |
| proformaInvoiceNumber | string or null Proforma invoice number (PI number) |
| proformaInvoiceEstimatedTimeOfDeparture | string or null <date-time> Proforma invoice estimated date (PI ETD) |
| referenceNumber | string or null Additional order number, for reference |
required | Array of objects (SalesOrderLineItem) Order lines, with details on SKU and quantities |
| season | string or null Products season if any |
required | object Shipper information (factory or supplier) |
required | object Consignee information (store, warehouse, ...) |
| sourcingOffice | string or null Sourcing office in charge of this order |
Responses
Default server
Sandbox server
Request samples
- Payload
{- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "billingTo": {
- "code": "CM0001",
- "name": "My Customer",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Entity"
}, - "cargoReadyDate": "2019-08-24T14:15:22Z",
- "comment": "Please take care of this comment",
- "company": 0,
- "destinationForwarder": {
- "code": "FW001",
- "name": "My Forwarder",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Forwarder"
}, - "department": "TOOLS",
- "dueAt": "2019-08-24T14:15:22Z",
- "externalOrderNumber": "CUSTPO12345678900",
- "incoterm": {
- "category": "INCOTERM",
- "code": "DAP"
}, - "incotermPlace": "NINGBO",
- "issuedAt": "2019-08-24T14:15:22Z",
- "mainTransportType": {
- "category": "TRANSPORTATION_MODE",
- "code": "SEA"
}, - "operationCode": "BS2022",
- "operationName": "Back to school 2022",
- "originForwarder": {
- "code": "FW002",
- "name": "My Forwarder 2",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Forwarder"
}, - "orderNumber": "PO00012345",
- "paymentTerms": "30 days after invoice",
- "portOfLoading": {
- "category": "LOCODE",
- "code": "CNSHA"
}, - "portOfDischarge": {
- "category": "LOCODE",
- "code": "FRFOS"
}, - "proformaInvoiceNumber": "PI00001234567",
- "proformaInvoiceEstimatedTimeOfDeparture": "2019-08-24T14:15:22Z",
- "referenceNumber": "REF0123456789",
- "salesOrderLineItems": [
- {
- "comment": "Please take care of this comment",
- "externalVariantId": "12345",
- "position": 1,
- "quantity": 10000,
- "quantityOfBoxes": 100,
- "totalWeight": 567.89,
- "totalVolume": 12.345,
- "unitPrice": 1.23,
- "unit": "PCS",
- "variant": "SKU001",
- "weightUnit": "string",
- "volumeUnit": "string"
}
], - "season": "AW22",
- "shipFrom": {
- "code": "SUP001",
- "name": "My Supplier",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Manufacturer"
}, - "shipTo": {
- "code": "C001",
- "name": "My delivery place",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Customer"
}, - "sourcingOffice": "My Sourcing Office"
}Update an existing Order
Edit order in the database
Request Body schema:
The new SalesOrder resource
object or null Additional data if necessary for a specific business usage. Data has to be posted in JSON format. Please contact the team if you would like to use it | |
object Company to which the order has to be billed to. The connection will be created on the fly if not existing in master data | |
| cargoReadyDate required | string or null <date-time> Date when the cargo is planned to be ready |
| comment | string or null Comment to be treated by Forwarder during operations |
| company required | integer Id of your company in Hubble. Please contact the team to get the value. |
required | object Forwarding company used at destination |
| department | string or null Purchasing department / product category for this order |
| dueAt required | string or null <date-time> Estimated time of departure (ETD) |
| externalOrderNumber | string or null Final customer order number, if any |
required | object Order incoterm |
| incotermPlace | string or null Place where the incoterm takes effect |
| issuedAt | string or null <date-time> Date when the order has been officially issued (if different from current date) |
required | object Main transportation mode: for sea freight: SEA |
| operationCode | string or null Promotional operation code linked this order, if any |
| operationName | string or null Promotional operation name linked this order, if any |
required | object Forwarding company used at origin |
| orderNumber required | string or null Main order number |
| paymentTerms | string or null Payment terms for this order |
required | object Port of loading (POL) |
required | object Port of discharge (POD) |
| proformaInvoiceNumber | string or null Proforma invoice number (PI number) |
| proformaInvoiceEstimatedTimeOfDeparture | string or null <date-time> Proforma invoice estimated date (PI ETD) |
| referenceNumber | string or null Additional order number, for reference |
required | Array of objects (SalesOrderLineItem) Order lines, with details on SKU and quantities |
| season | string or null Products season if any |
required | object Shipper information (factory or supplier) |
required | object Consignee information (store, warehouse, ...) |
| sourcingOffice | string or null Sourcing office in charge of this order |
Responses
Default server
Sandbox server
Request samples
- Payload
{- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "billingTo": {
- "code": "CM0001",
- "name": "My Customer",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Entity"
}, - "cargoReadyDate": "2019-08-24T14:15:22Z",
- "comment": "Please take care of this comment",
- "company": 0,
- "destinationForwarder": {
- "code": "FW001",
- "name": "My Forwarder",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Forwarder"
}, - "department": "TOOLS",
- "dueAt": "2019-08-24T14:15:22Z",
- "externalOrderNumber": "CUSTPO12345678900",
- "incoterm": {
- "category": "INCOTERM",
- "code": "DAP"
}, - "incotermPlace": "NINGBO",
- "issuedAt": "2019-08-24T14:15:22Z",
- "mainTransportType": {
- "category": "TRANSPORTATION_MODE",
- "code": "SEA"
}, - "operationCode": "BS2022",
- "operationName": "Back to school 2022",
- "originForwarder": {
- "code": "FW002",
- "name": "My Forwarder 2",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Forwarder"
}, - "orderNumber": "PO00012345",
- "paymentTerms": "30 days after invoice",
- "portOfLoading": {
- "category": "LOCODE",
- "code": "CNSHA"
}, - "portOfDischarge": {
- "category": "LOCODE",
- "code": "FRFOS"
}, - "proformaInvoiceNumber": "PI00001234567",
- "proformaInvoiceEstimatedTimeOfDeparture": "2019-08-24T14:15:22Z",
- "referenceNumber": "REF0123456789",
- "salesOrderLineItems": [
- {
- "comment": "Please take care of this comment",
- "externalVariantId": "12345",
- "position": 1,
- "quantity": 10000,
- "quantityOfBoxes": 100,
- "totalWeight": 567.89,
- "totalVolume": 12.345,
- "unitPrice": 1.23,
- "unit": "PCS",
- "variant": "SKU001",
- "weightUnit": "string",
- "volumeUnit": "string"
}
], - "season": "AW22",
- "shipFrom": {
- "code": "SUP001",
- "name": "My Supplier",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Manufacturer"
}, - "shipTo": {
- "code": "C001",
- "name": "My delivery place",
- "streetAddress": "123 Main St",
- "streetAddress2": null,
- "streetAddress3": null,
- "zipCode": 123000,
- "district": null,
- "city": "Anytown",
- "state": null,
- "countryCode": "US",
- "relationship": "Customer"
}, - "sourcingOffice": "My Sourcing Office"
}