Skip to main content

Get orders

curl -X GET \
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...' \
https://api.sandbox.ledyer.com/v1/orders \

Query parameters

createdFrom

stringOptional

A date in ISO 8601 format, ex: 2011-10-05T14:48:00.000Z.

createdTo

stringOptional

A date in ISO 8601 format, ex: 2011-10-05T14:48:00.000Z.

cursor

stringOptional

The value of nextCursor from the last response of a GET /orders. Passing in a cursor will return the next batch of orders. Use this to implement pagination/infinite scroll.

expiresFrom

stringOptional

A date in ISO 8601 format, ex: 2011-10-05T14:48:00.000Z.

expiresTo

stringOptional

A date in ISO 8601 format, ex: 2011-10-05T14:48:00.000Z.

fromId

stringOptionalDeprecated

Depracted, use cursor instead.

An orderId used to get the next set of orders, where the set size is based on the size parameter. It is usually assigned the value from lastId which was retrieved in the response from the last GET /orders request.

id

array of stringsOptional

An array of ids.

merchantReference

array of stringsOptional

An array of merchantReferences.

orderReference

array of stringsOptional

An array of orderReferences.

paymentMethodCategory

array of stringsOptional

A list of strings querying categories of payment methods.

  • advanceInvoice: An invoice that needs to be paid in advance before order can be ready for capture.
  • card: Direct payment via card.
  • invoice: An invoice issued by Ledyer that can be paid within a set amount of days.
  • serviceInvoice: An invoice administrated by Ledyer.

q

stringOptional

A search query consisting of either an orderId, orderReference or a merchantReference. Matches the full string.

size

numberOptional

The number of orders to fetch. Defaults to 100.

status

array of stringsOptional

A list of status strings querying orders with matching status/es. Given more than one status string, the query will match orders with any status in the list.

  • cancelled: Order has been cancelled.
  • expired: The expiry date of the order is passed.
  • fullyCaptured: All order lines have been captured.
  • fullyPaid: The order has been paid fully.
  • fullyRefunded: All order lines have been added to a credit invoice.
  • partiallyCaptured: Some of the order lines have been captured.
  • partiallyPaid: The order has been paid partially.
  • partiallyRefunded: Some of the order lines have been added to a credit invoice.
  • unacknowledged: The order has not yet been acknowledged.
  • uncaptured: The order has not yet been captured.

statusAnd

array of stringsOptional

A list of status strings for querying orders with matching status/es. The statuses in queried orders need to match all status strings provided in the query.

  • cancelled: Order has been cancelled.
  • expired: The expiry date of the order is passed.
  • fullyCaptured: All order lines have been captured.
  • fullyPaid: The order has been paid fully.
  • fullyRefunded: All order lines have been added to a credit invoice.
  • partiallyCaptured: Some of the order lines have been captured.
  • partiallyPaid: The order has been paid partially.
  • partiallyRefunded: Some of the order lines have been added to a credit invoice.
  • unacknowledged: The order has not yet been acknowledged.
  • uncaptured: The order has not yet been captured.

storeId

array of stringsOptional

An array of storeIds.