API를 통한 주문 데이터 동기화

백엔드를 통한 주문 데이터 동기화(권장)

주문 데이터를 Epsilon Retail Media에 전송하려면 아래 명령과 유사한 명령을 사용하십시오. 아래 orders 필드의 데이터는 더미 데이터로 여기에서는 예시로만 제공됩니다. 이러한 예는 모두 표준 통합을 표시합니다.

📘

마켓플레이스 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",
        "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",
        }
    ]
}
🚧

OrderDate 형식

위 형식의 OrderDate는 UTC 시간으로 읽습니다. UTC로 동기화해야 합니다.

또는 귀하의 시간대에 해당하는 +HH:MMZ(으)로 대체하여 시간대 오프셋을 설정할 수 있습니다. 예: "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를 동기화해야 합니다. 구매한 제품에 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 내에서 주문 정보를 확인하려는 경우 주문 ID를 사용하여 /orders/ API에 GET 요청을 보내야 합니다.

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.