การซิงค์ข้อมูลคำสั่งซื้อผ่านแบ็กเอนด์ (แนะนำ)
ในการส่งข้อมูลคำสั่งซื้อไปยัง Epsilon Retail Media ให้ใช้คำสั่งที่คล้ายกับคำสั่งด้านล่าง โปรดทราบว่าข้อมูลในช่อง orders ด้านล่างเป็นข้อมูลจำลอง และให้ไว้ที่นี่เพื่อเป็นตัวอย่างเท่านั้น ตัวอย่างเหล่านี้ทั้งหมดแสดง การรวมมาตรฐาน
คําสั่งซื้อสินค้ารายการเดียว
ด้านล่างนี้คือบริบทสำหรับลูกค้าที่ซื้อสินค้ารายการเดียว:
POST $BASE_URL/v1/orders HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
"orders": [
{
"customerId": "npc-s243-ir",
"teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "DTM_COOKIE_ID",
"orderDate": "2021-12-02T15:00:00Z",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
}
]
}หากสำเร็จ อ็อบเจ็กต์ต่อไปนี้จะถูกส่งคืน:
HTTP/2 200
{
"orders": [
{
"teamId": "a7e5cat7-9964-4ff3-bbb1-94bf9b53a366",
"customerId": "npc-s243-ir",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "aaa_bbb_e345D",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"regularUnitPrice": 1.00,
"citrusDiscountAmount": null,
"gtin": "9891998566P",
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"quantity": 3,
"substitutedFor": null,
"totalOrderItemPriceAfterDiscounts": 3.00,
"sellerId": "seller_id_601_64",
}
],
"orderDate": "2021-12-02T15:00:00Z",
}
]
}
รูปแบบ OrderDateOrderDate ในรูปแบบด้านบนอ่านเป็นเวลา UTC คุณต้องซิงค์ใน UTC
หรือคุณสามารถตั้งค่าออฟเซ็ตสำหรับเขตเวลาของคุณ โดยแทนที่
Zสำหรับ+HH:MMที่เกี่ยวข้องกับเขตเวลาของคุณ ตัวอย่างเช่น: “orderDate”:“2021-12-02T15:00:00+10:00"จะระบุเขตเวลาเป็น UTC+10
คําสั่งซื้อหลายรายการ
ด้านล่างนี้คือบริบทสำหรับลูกค้าที่ซื้อหลายรายการ - มีหลายรายการในอาร์เรย์ orderItems:
POST $BASE_URL/v1/orders HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
"orders": [
{
"customerId": "npc-s243-ir",
"teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "DTM_COOKIE_ID",
"orderDate": "2021-12-02T15:00:00Z",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
},
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
}
]
}หากสำเร็จ อ็อบเจ็กต์ต่อไปนี้จะถูกส่งคืน:
HTTP/2 200
{
"orders": [
{
"teamId": "a7e5cat7-9964-4ff3-bbb1-94bf9b53a366",
"customerId": "npc-s243-ir",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "aaa_bbb_e345D",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"regularUnitPrice": 1.00,
"citrusDiscountAmount": null,
"gtin": "9891998566P",
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"quantity": 3,
"substitutedFor": null,
"totalOrderItemPriceAfterDiscounts": 3.00,
"sellerId": "seller_id_601_64",
},
{
"regularUnitPrice": 1.00,
"citrusDiscountAmount": null,
"gtin": "9891998566P",
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"quantity": 3,
"substitutedFor": null,
"totalOrderItemPriceAfterDiscounts": 3.00,
"sellerId": "seller_id_601_64",
}
],
"orderDate": "2021-12-02T15:00:00Z",
}
]
}การซิงค์คำสั่งซื้อหลายรายการ
หากคุณกำลังซิงค์หลายคำสั่งซื้อ คุณสามารถส่งได้สูงสุด 100 รายการเป็นชุดสำหรับแต่ละคำขอ จำนวนคำขอที่คุณสามารถทำได้ไม่จำกัด คำสั่งเพย์โหลดที่พุชเป็นลำดับเดียวกันกับผลลัพธ์ที่ส่งคืน ซึ่งช่วยให้ข้อมูลจะยังคงสอดคล้องกับการแสดงคำสั่งซื้อในแบ็กเอนด์ของคุณ
POST $BASE_URL/v1/orders HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
"orders": [
{
"customerId": "npc-s243-ir",
"teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "DTM_COOKIE_ID",
"orderDate": "2021-12-02T15:00:00Z",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
},
{
"customerId": "rw3-v3ag-ol0",
"teamId": "a7e5cat7-9964-4ff3-bbb1-94bf9b53a366",
"sessionId": "2m342-2dfe-0f",
"orderDate": "2021-12-02T15:00:00Z",
"id": "i32dm3e4-c158-43d78-43ww32x-m2ide3e3",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
}
]
}หากสำเร็จ อ็อบเจ็กต์ต่อไปนี้จะถูกส่งคืน:
HTTP/2 200
{
"orders": [
{
"teamId": "a7e5cat7-9964-4ff3-bbb1-94bf9b53a366",
"customerId": "npc-s243-ir",
"sessionId": "5cat7-9964-4f",
"dtmcookieid": "aaa_bbb_e345D",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"regularUnitPrice": 1.00,
"citrusDiscountAmount": null,
"gtin": "9891998566P",
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"quantity": 3,
"substitutedFor": null,
"totalOrderItemPriceAfterDiscounts": 3.00,
"sellerId": "seller_id_601_64",
}
],
"orderDate": "2021-12-02T15:00:00Z"
},
{
"teamId": "a7e5cat7-9964-4ff3-bbb1-94bf9b53a366",
"customerId": "npc-s243-ir",
"sessionId": "5cat7-9964-4f",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"regularUnitPrice": 1.00,
"citrusDiscountAmount": null,
"gtin": "9891998566P",
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"quantity": 3,
"substitutedFor": null,
"totalOrderItemPriceAfterDiscounts": 3.00,
"sellerId": "seller_id_601_64",
}
],
"orderDate": "2021-12-02T15:00:00Z"
}
]
}รหัสผู้ขายในตลาด
หากคุณกำลังเตรียมความพร้อมผู้ขายในตลาด คุณต้องซิงค์ sellerId หากทำได้ เมื่อรายงานคำสั่งซื้อ ในกรณีที่ผลิตภัณฑ์ที่ซื้อไม่มี sellerId สามารถละเว้นได้
หากคุณไม่ได้เริ่มต้นใช้งานผู้ขายในตลาดกลาง คุณไม่จำเป็นต้องระบุรหัสผู้ขายในรายงานคำสั่งซื้อ
ด้านล่างนี้เป็นตัวอย่างการสั่งซื้อผลิตภัณฑ์หนึ่งมาจากผู้ขายในตลาดและอีกรายการหนึ่งไม่ใช่ผลิตภัณฑ์ในตลาด:
POST $BASE_URL/v1/orders HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>
{
"orders": [
{
"customerId": "npc-s243-ir",
"teamId": "9f48572c-0a5b-4997-9a0e-ed74f4d32dc6",
"dtmcookieid": "DTM_COOKIE_ID",
"sessionId": "5cat7-9964-4f",
"orderDate": "2021-12-02T15:00:00Z",
"id": "3h30e938-c158-4d78-a0af-b48bbwfrcss4",
"orderItems": [
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
"sellerId": "seller_id_601_64"
}
]
},
{
"gtin": "9891998566P",
"quantity": 3,
"regularUnitPrice": 1.00,
"totalOrderItemPriceAfterDiscounts": 3.00,
"catalogId": "6adb93d0-7he4-4d4e-9b47-e5d3714c976a",
"citrusDiscountAmount": 0.0,
"substitutedFor": null,
}
]
}
]
}กำลังเรียกดูข้อมูลการสั่งซื้อ
หากคุณต้องการตรวจสอบข้อมูลคำสั่งซื้อภายใน Epsilon Retail Media คุณจะต้องส่งคำขอ GET ไปยัง /orders/ API ด้วยรหัสคำสั่งซื้อ
GET $BASE_URL/v1/orders/<ORDER_ID> HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic <API_KEY>You will retrieve all information related to the order stored within the Epsilon Retail Media system.
In the event the order is not found, it has likely not been ingested into the Epsilon Retail Media system.

