Create Sales Order B2C
Last Updated: 16/2/2023
Create Sales Order B2C
Shipper API gives interface access to our clients for creating Sales Order API from their own system to Shipper Order Management System. It applies for B2C type of Business if you have multiple channel for source orders.
- Authorizations : X-API-Key_Header
- Request Body Schema : application/json
POST Create Sales Order B2C
Method | Endpoint |
---|---|
POST | /v3/fulfillment/outbound/oms |
Important Note
- 1 SKU Code map to 1 UoM. Example: 1 Carton and 1 Pack of the same Goods will use different SKU Code at WMS and OMS
- If there is note "Please Fill with Empty String / 0 / false", it means client still need to pass ““ / 0 / false value to that parameter.
Body Request Parameter
Field | Data Type | Description | Note |
---|---|---|---|
warehouse_id | String(20) | Warehouse code assigned Example: WH-TGR04 | Mandatory |
customer_id | String(20) | Owner ID assigned Example: CS674 | Mandatory |
so_number | String(50) | Sales Order Number Example: SALESOUTBOUND1 | Mandatory Can't contain special characters |
order_type | String | Order type Example: SO | Optional Only accept value: - SO (sales order) - TT (inter-trasnfer wh)If no input, the default value = SO |
order_source | String(32) | To track where this order comes from | Optional Please leave it as empty if you are a pure open API client. Please input this field if you are ERP/omichannel. |
platform | String(64) | To track which marketplace this order comes from | Optional Existing value: - LAZADA - SHOPEE - TOKOPEDIA - TIKTOK - BLIBLI - AKULAKU - BUKALAPAK - SHOPIFY - ERPIf the marketplace is not listed above, please contact Shipper to add the value. |
order_identification_code | Integer | Public Order Identification Example: 1 | Mandatory Must be filled with 1 (Pending Shipment) |
internal_order_status | String(30) | Client’s ERP order status Example: Pending | Mandatory |
express_code | String(30) | Courier Code Example: JNE YES | Optional |
tenant_name | String(200) | Client Name Example: Matahari | Mandatory |
consignee | String(200) | Consignee Name Example: Riza Budi | Mandatory |
consignee_phone | String(40) | Consignee Phone Example: 085123456789 | Mandatory |
consignee_email | String(100) | Consignee Email Address Example: [email protected] | Optional |
consignee_full_address | String(400) | Consignee Full Address such as street no, district, city, province Example: Jl. Open Api no 5, Tanah Abang, Jakarta Pusat, DKI Jakarta | Mandatory |
consignee_state | String(20) | Consignee State Example: Indonesia | Mandatory |
consignee_province | String(50) | Consignee Province Example: DKI Jakarta | Mandatory |
consignee_city | String(50) | Consignee City Example: Jawa Timur | Mandatory |
zip_code | String(5) | Consignee ZIP Code Example: 12345 | Mandatory Must be 5 characters |
buyer_remark | String(500) | Buyer Remarks Example: “Catatan untuk buyer” | Optional |
seller_remark | String(200) | Seller Remarks Example: “Catatan dari Seller” | Optional |
order_price | Decimal(10,2) | Sales Order Price Example: 100000.0 | Mandatory If payment type = 1, then this is COD order, this field's value must be > 0 |
postage | Decimal(10,2) | Delivery Cost from the courier or 3PL Example: 20000.0 | Optional |
cod_price | Decimal(10,2) | Cash on Delivery for the sales order Example: 20000.0 | Mandatory If payment type = 1, then this is COD order, this field's value must be > 0 |
order_time | yyyy-MM-ddTHH:mm:ssZ | Sales Order Created Date Time Time Zone: UTC +7 Example: 2023-11-14T14:53:50Z | Mandatory |
payment_time | yyyy-MM-ddTHH:mm:ssZ | Payment time Time Zone: UTC +7 Example: 2023-11-14T14:53:50Z | If payment_type = 0, then it is non-COD this field become Mandatory. If payment_type = 1, then it is COD this field become Optional. |
payment_type | Integer | Payment Type 0: Non-Cash on Delivery, 1: Cash on Delivery (COD) | Mandatory Please fill with either 0 or 1 |
payment_way | String(20) | Payment Method Code Example: Other | Mandatory Accepted value: - Other - COD |
distribution_status | Integer | Whether is it a distribution order Example: 1 | Mandatory Must be filled with 1 |
plat_last_changed | yyyy-MM-ddTHH:mm:ssZ | Last update time of order from client’s ERP Time Zone: UTC +7 Example: 2023-11-14T14:53:50Z | Mandatory |
express_no | String(30) | AWB Number Example: AWB12345 | Optional |
shipping_label_url | String(500) | shipping_label_url (should be pdf url with preview) | Optional |
is_logistic_order | Boolean | Logistic order status Example: True/False | Optional If you use logistic integration, then the value must be True |
is_insurance | Boolean | Use insurance if use logistic order Example: True/False | Optional If you use logistic integration, then the value must be True |
longitude | String(16) | Consignee longitude [-180.0,180.0] | Optional but mandatory for instant and same-day service |
latitude | String(16) | Consignee latitude [-90.0,90.0] | Optional but mandatory for instant and same-day service |
origin_area_id | Integer | origin (warehouse) area_id example: 4661 | Optional but mandatory for Fulfillment x Logistic Integration The value should be positive (>0). The area ID of the origin obtained from Location API |
destination_area_id | Integer | origin (warehouse) area_id example: 4709 | Optional but mandatory for Fulfillment x Logistic Integration The value should be positive (>0). The area ID of the destination obtained from Location API (No Symbol Allowed Except # & ' . - = + , ( ) ) |
sku | String(40) | SKU Code. Example: SKU123 | Mandatory |
order_qty | Integer | Order Quantity. Example: 1 | Mandatory Value must be above 1 |
stock_condition | String | ONLY input Y or N Y: DAMAGED condition N: GOOD condition | Optional For RT order type, if this field is empty, will default as "Y", which is DAMAGED condition. For SO/TT order type, if this field is empty, will default as "N", which is GOOD condition. |
goods_price | Decimal(10,2) | Goods Price Example: 100000.0 | Optional |
weight | Decimal | Weight for one unit. (kg) | Optional Better to input if you use Shipper logisitics integration. Number round up to integer |
length | Decimal | Length for one unit. (cm) | Optional Better to input if you use Shipper logisitics integration. Number round up to integer |
height | Decimal | Height for one unit. (cm) | Optional Better to input if you use Shipper logisitics integration. Number round up to integer |
width | Decimal | Width for one unit. (cm) | Optional Better to input if you use Shipper logisitics integration. Number round up to integer |
expected_shipment_time | yyyy-MM-ddTHH:mm:ssZ | Expected Time for Order should be send / handover to courier / 3pl | Optional |
Sample Body Request
Only use Complete Body Request if you use the non Mandatory fields. Ex: If you use Fulfillment x Logistics Integration
Header | How to Fill |
---|---|
x-api-key | Shipper api key |
{
"data": {
"outbound": {
"customer_id": "CS674",
"warehouse_id": "WH-SUB51",
"so_number": "SHO1653010613784526DO",
"order_identification_code": 1,
"internal_order_status": "Pending Shipment",
"tenant_name": "123",
"consignee": "Krisna",
"consignee_phone": "628123356789",
"consignee_email": "[email protected]",
"consignee_full_address": "Nayaka kosmetik kotaraya,Jl igusti ngurah rai no.134 ,desa kotaraya selatan,Palasa,Palasa,Sulawesi Tengah,Parigi Moutong 94477",
"consignee_state": "Indonesia",
"consignee_province": "Sulawesi Tengah",
"consignee_city": "Parigi Moutong",
"zip_code": "94477",
"buyer_remark": "Remark",
"seller_remark": "Remark",
"order_price": 417000,
"postage": 0,
"cod_price": 0,
"order_time": "2022-05-20T01:38:37.726Z",
"payment_time": "2022-05-20T01:38:37.726Z",
"payment_type": 0,
"payment_way": "Transfer",
"distribution_status": 0,
"plat_last_changed": "2022-05-20T01:38:37.726Z",
"express_no": "AWB3424234234",
"express_code": "JNE Reguler",
"details": [
{
"sku": "SKU00123",
"order_qty": 3,
"goods_price": 123000
}
]
}
}
}
{
"data": {
"outbound": {
"area": "setiabudi",
"buyer_remark": "buyer-remark",
"cod_price": 10000,
"consignee": "QA",
"consignee_city": "kota jakarta selatan",
"consignee_doc_no": "N7F4A7Y28LSTT4VOYGGU",
"consignee_doc_type": 1,
"consignee_email": "[email protected]",
"consignee_full_address": "Plaza 89 Rasuna Said",
"consignee_mobile": "6282212345678",
"consignee_phone": "62822123456",
"consignee_province": "dki jakarta",
"consignee_state": "Indonesia",
"customer_id": "CS15",
"discount_price": 200,
"distribution_mode": 1,
"distribution_name": "",
"distribution_status": 0,
"express_code": "JNE Cashless",
"express_no": "59112924",
"express_print_data": "",
"gross_weight": 2.2,
"internal_order_status": "to be delivered",
"invoice_amount": 0,
"invoice_content": "",
"invoice_title": "",
"invoice_type": 0,
"notice_send_date": "",
"order_identification_code": 1,
"order_price": 2565,
"order_time": "2022-09-01T14:56:24Z",
"outboundID": 1,
"paint_maker": "",
"payment_number": "2021020500565088",
"payment_time": "2022-09-01T14:56:24Z",
"payment_type": 0,
"payment_way": "OTHER",
"plat_last_changed": "2022-09-01T14:56:24Z",
"postage": 80,
"pre_tax_price": 2485,
"seller_flag": "",
"seller_nick": "JAMAL",
"seller_remark": "sel-remark",
"so_number": "9LTS1W9HVXTIPSS4ARYU",
"tax_price": 26.15,
"tenant_name": "AHN",
"town": "Karet Kuningan",
"trans_priority": 0,
"warehouse_id": "WH-TGR04",
"zip_code": "12940",
"shipping_label_url": "
https://erp.oss.aliyuncs.com/pdf/YzE0Njg0MDEyNTk3NmU2OGI4DhmNDZhZDMwMDQzYTE%D.pdf",
"origin_area_id": "4661",
"destination_area_id": "4709",
"details": [
{
"avg_money": 0,
"discount_price": 0,
"goods_price": 2485,
"net_weight": 0.8,
"oid": "1",
"order_qty": 1,
"refund_status": 0,
"sku": "AHNA0002",
"sku_properties": "",
"tax_price": 26.15,
"title": "PS5"
}
]
}
}
}
Sample Response
{
"metadata": {
"path": "/v3/fulfillment/outbound/oms",
"http_status_code": 201,
"http_status": "Created",
"timestamp": 1637652372
},
"data": {
"request_id": "outbound.2021.11.23072612.183239"
}
}
{
"metadata": {
"path": "/v3/fulfillment/outbound/oms",
"http_status_code": 400,
"http_status": "Bad Request",
"errors": [
{
"code": 810,
"message": "Invalid Input. Please Validate Your Input."
}
],
"timestamp": 1637652448
}
}
{
"metadata": {
"path": "/v3/fulfillment/outbound/oms",
"http_status_code": 401,
"http_status": "Unauthorized",
"errors": [
{
"code": 10001,
"message": "Unauthorized Access. You are not authorized to access this resource."
}
],
"timestamp": 1637652420
}
}
{
"metadata": {
"path": "/v3/fulfillment/supplier",
"http_status_code": 500,
"http_status": "Internal Server Error",
"errors": [
{
"code": 803,
"message": "Internal Server error."
}
],
"timestamp": 1637555484
}
}
Status | Reason |
---|---|
201 | Create sales order B2C success |
400 | Please check your input. Make sure the JSON payload is correct Make sure the requested input are valid. |
401 | Please check whether your API Key is valid and still active. |
500 | Something wrong with Shipper application. Please contact Shipper representative. |
Updated 7 months ago
What’s Next