Problem on retrieving order details with the new api

  • Servitel

    547 mensajes

    Suiza

    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
    Administrador

    368 mensajes

    Bélgica

    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
    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 mensajes

    Suiza

    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
    Thanks Thomas !
    is explanation is ok. We create a retrieve procedure by bill_id

    Regards
    Roberto
  • Servitel

    547 mensajes

    Suiza

    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
    Administrador

    368 mensajes

    Bélgica

    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 ?
    Yes, the filter works, and it is documented here:
    Vinculo (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 mensajes

    Suiza

    Yes, the filter works, and it is documented here:
    Vinculo (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
    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: Vinculo (https)
  • @thomas
    Administrador

    368 mensajes

    Bélgica

    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: Vinculo (https)
    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