Skip to main content
POST
/
orders
Add a new order
curl --request POST \
  --url https://api.rechain.co/public/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "companyId": "123e4567-e89b-12d3-a456-426614174000",
  "status": 1,
  "supplierId": 120,
  "manufacturerLocationId": "123e4567-e89b-12d3-a456-426614174000",
  "manufacturerContactId": "123e4567-e89b-12d3-a456-426614174000",
  "shippingMethod": "Shipping Method",
  "shippingDate": "2021-01-01T00:00:00Z",
  "paymentTerms": "<string>",
  "incoterms": 1,
  "confirmed": true,
  "currency": 1,
  "rechainSupport": true,
  "referenceName": "<string>",
  "shippingAddressId": "123e4567-e89b-12d3-a456-426614174000",
  "billingAddressId": "123e4567-e89b-12d3-a456-426614174000",
  "paymentDeadline": "2021-01-01",
  "invoiceDate": "2021-01-01",
  "notes": "<string>",
  "inventorySynced": true,
  "orderMode": 1,
  "exFactoryDate": "2023-12-25",
  "currencies": [
    "<string>"
  ]
}
'
{
  "count": 123,
  "exceptionCount": 123,
  "lateCount": 123,
  "inProgressCount": 123,
  "completedCount": 123,
  "draftCount": 123,
  "pendingReviewCount": 123,
  "id": 123,
  "uuid": "<string>",
  "reference": "<string>",
  "unitsProduced": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "country": "<string>",
  "manufacturerLocation": {
    "id": 123,
    "country": "<string>"
  },
  "manufacturerContact": {
    "id": 123,
    "name": "<string>"
  },
  "contact": "<string>",
  "productCategory": "<string>",
  "supplierCompany": {
    "id": 123,
    "name": "<string>"
  },
  "shippingDate": "2023-12-25",
  "totalQuantity": 123,
  "productId": "123e4567-e89b-12d3-a456-426614174000",
  "productIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "otherPartyCompany": "<string>",
  "orderProducts": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "<string>",
      "variantId": "123e4567-e89b-12d3-a456-426614174000",
      "parentId": "123e4567-e89b-12d3-a456-426614174000",
      "parentName": "<string>",
      "quantity": 123,
      "pricePerUnit": 123,
      "sizesQuantity": {},
      "productSizes": [
        "<string>"
      ],
      "prices": {}
    }
  ],
  "productSizes": [
    "<string>"
  ],
  "company": {
    "id": 123,
    "name": "<string>"
  },
  "currentMilestoneGroupId": 123,
  "milestoneGroups": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000-id",
      "recordId": "123e4567-e89b-12d3-a456-426614174000",
      "position": 123,
      "objectType": "milestoneGroup",
      "name": "<string>",
      "color": "<string>",
      "start": "2023-12-25",
      "end": "2023-12-25",
      "milestones": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000-id",
          "milestoneGroupId": "123e4567-e89b-12d3-a456-426614174000",
          "recordId": "123e4567-e89b-12d3-a456-426614174000",
          "orderId": "123e4567-e89b-12d3-a456-426614174000",
          "status": 1,
          "humanizedStatus": "<string>",
          "objectType": "milestone",
          "name": "<string>",
          "start": "2023-12-25",
          "end": "2023-12-25",
          "position": 123
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a new order in the store

companyId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

status
enum<integer>

Order status, can be any of { not_finalized: 0, in_progress: 1, completed: 2, late: 3, exception: 4, draft: 5, pending_review: 6 }

Available options:
0,
1,
2,
3,
4,
5,
6
Example:

1

supplierId
integer
Example:

120

manufacturerLocationId
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

manufacturerContactId
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

shippingMethod
string
Example:

"Shipping Method"

shippingDate
string<date-time>
Example:

"2021-01-01T00:00:00Z"

paymentTerms
string
incoterms
enum<integer>

Incoterms, can be any of { exw: 0, fca: 1, cpt: 2, cip: 3, dap: 4, dpu: 5, ddp: 6, fas: 7, fob: 8, cfr: 9, cif: 10 }

Available options:
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
Example:

1

confirmed
boolean
Example:

true

currency
enum<integer>

Currency, can be any of { usd: 0, eur: 1, gbp: 2, cny: 3 }

Available options:
0,
1,
2,
3
Example:

1

rechainSupport
boolean
referenceName
string
shippingAddressId
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

billingAddressId
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

paymentDeadline
string<date>
Example:

"2021-01-01"

invoiceDate
string<date>
Example:

"2021-01-01"

notes
string
inventorySynced
boolean
orderMode
enum<integer>

Order mode, can be any of { fpp: 0, cmt: 1 }

Available options:
0,
1
Example:

1

exFactoryDate
string<date>
currencies
string[]

Response

Successful operation

count
integer
exceptionCount
integer
lateCount
integer
inProgressCount
integer
completedCount
integer
draftCount
integer
pendingReviewCount
integer
id
integer
uuid
string
reference
string
unitsProduced
integer
createdAt
string<date-time>
country
string
manufacturerLocation
object
manufacturerContact
object
contact
string
productCategory
string
supplierCompany
object
shippingDate
string<date>
totalQuantity
integer
productId
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"

productIds
string<uuid>[]
otherPartyCompany
string
orderProducts
object[]
productSizes
string[]
company
object
currentMilestoneGroupId
integer
milestoneGroups
object[]