Problem on retrieving order details with the new api

  • Servitel

    547 Beiträge

    Schweiz

    Hi Support
    on the new api you have decided not to pass order details on the event item.sold.
    This means we need to call /orders to retrieve last orders and try to collect order details from this result

    But now one of our clients have received an order with 28 items. You send 28 callback, but checking immediatly /orders this order is not present.

    This is a big problem adn I suggest you to pass all order details as per the old system inside the callback as per save some calls for retrieving order details

    Thanks
    Roberto
  • @thomas
    Administrator

    368 Beiträge

    Belgien

    Hi Support
    on the new api you have decided not to pass order details on the event item.sold.
    This means we need to call /orders to retrieve last orders and try to collect order details from this result

    But now one of our clients have received an order with 28 items. You send 28 callback, but checking immediatly /orders this order is not present.

    This is a big problem adn I suggest you to pass all order details as per the old system inside the callback as per save some calls for retrieving order details

    Thanks
    Roberto
    • Erstellt am 19.11.2026 um 12:50
    • #2085278
    Hello Roberto,

    Thanks for your report.

    The `item.sold` event carries three fields: item_id, personal_reference and bill_id. The bill_id is the key to the order. To get the details, call:

    GET /v1/sales?bill_id={bill_id}&limit=100

    Each entry is one sold item, with quantity, prices, the buyer and the address to ship to. To read only the line an event is about, add the item:

    GET /v1/sales?bill_id={bill_id}&item_id={item_id}

    The bill itself (status, amounts, shipping, trackings) is on

    GET /v1/bills/{bill_id}

    If the order is still missing with these calls, please send us the seller nickname, the bill_id, the exact URL you called and the time of the call, and we will look into it.

    With this approach, do you still see a need for more details in the event itself? If so, tell us which fields you would use and what they would save you.

    Best regards,
    --
    Thomas
    Delcampe Team
  • Servitel

    547 Beiträge

    Schweiz

    Hello Roberto,

    Thanks for your report.

    The `item.sold` event carries three fields: item_id, personal_reference and bill_id. The bill_id is the key to the order. To get the details, call:

    GET /v1/sales?bill_id={bill_id}&limit=100

    Each entry is one sold item, with quantity, prices, the buyer and the address to ship to. To read only the line an event is about, add the item:

    GET /v1/sales?bill_id={bill_id}&item_id={item_id}

    The bill itself (status, amounts, shipping, trackings) is on

    GET /v1/bills/{bill_id}

    If the order is still missing with these calls, please send us the seller nickname, the bill_id, the exact URL you called and the time of the call, and we will look into it.

    With this approach, do you still see a need for more details in the event itself? If so, tell us which fields you would use and what they would save you.

    Best regards,
    --
    Thomas
    Delcampe Team
    • Erstellt am 23.11.2026 um 06:13
    • #2086730
    Thanks Thomas !
    is explanation is ok. We create a retrieve procedure by bill_id

    Regards
    Roberto
  • Servitel

    547 Beiträge

    Schweiz

    tried to use /sales?bill_id=11111111 (with a real bill_id) and the answer is this:
    Array ( [status_code] => 200 [data] => Array ( [sales] => Array ( ) [pagination] => Array ( [limit] => 100 [next_cursor] => ) ) )

    the bill_id filter is not documented into the api description.
    Are you sure this filter works ?
  • @thomas
    Administrator

    368 Beiträge

    Belgien

    tried to use /sales?bill_id=11111111 (with a real bill_id) and the answer is this:
    Array ( [status_code] => 200 [data] => Array ( [sales] => Array ( ) [pagination] => Array ( [limit] => 100 [next_cursor] => ) ) )

    the bill_id filter is not documented into the api description.
    Are you sure this filter works ?
    • Erstellt am 23.11.2026 um 07:25
    • #2086766
    Yes, the filter works, and it is documented here:
    Link (https)

    A 200 with an empty list means the filter was applied and no sale of your account is grouped on that bill.

    To check, take one item of that order and call:

    GET /v1/sales?item_id={item_id}

    The sale comes back with its current bill_id. The bill_id of the event is right when the event is sent, but it can change afterwards: if the seller groups several bills into one on the site, the sales move to a new bill and the former number is no longer valid.

    If it still returns nothing, send us the seller nickname, the bill_id and the item_id, and we will check on our side.

    Best regards,
    --
    Thomas
    Delcampe Team
  • Servitel

    547 Beiträge

    Schweiz

    Yes, the filter works, and it is documented here:
    Link (https)

    A 200 with an empty list means the filter was applied and no sale of your account is grouped on that bill.

    To check, take one item of that order and call:

    GET /v1/sales?item_id={item_id}

    The sale comes back with its current bill_id. The bill_id of the event is right when the event is sent, but it can change afterwards: if the seller groups several bills into one on the site, the sales move to a new bill and the former number is no longer valid.

    If it still returns nothing, send us the seller nickname, the bill_id and the item_id, and we will check on our side.

    Best regards,
    --
    Thomas
    Delcampe Team
    • Erstellt am 23.11.2026 um 07:44
    • #2086778
    Checked the bill_id and the return is an empty answer
    Userid: 2868287
    bill_id: 107814224
    some items on this order:
    2671332581
    2671331426
    2671331417
    2671331414
    2671330646

    call: Link (https)
  • @thomas
    Administrator

    368 Beiträge

    Belgien

    Checked the bill_id and the return is an empty answer
    Userid: 2868287
    bill_id: 107814224
    some items on this order:
    2671332581
    2671331426
    2671331417
    2671331414
    2671330646

    call: Link (https)
    • Erstellt am 23.11.2026 um 10:29
    • #2086862
    Hello Roberto,

    Thanks for the details. We reproduced your call on our side: for seller 2868287, GET /v1/sales?limit=100&bill_id=107814224 returns the 28 sales of that bill.

    Could you call GET /v1/account with the same key as your /sales call? It returns the account the key belongs to, which should be 2868287. A key only sees the sales of its own account, so another id would explain the empty list.

    If the account is the right one, please send us the request as sent (URL and the last 4 characters of the key) with the time of the call, and we will look further.

    Best regards,
    --
    Thomas
    Delcampe Team