Get orders

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

Query parameters

createdFrom string Optional
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
createdTo string Optional
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
cursor string Optional
Use `nextCursor` from the previous `GET /orders` response to fetch the next page.
expiresFrom string Optional
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
expiresTo string Optional
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
fromId string Optional Deprecated
Deprecated. Use `cursor` instead.
id array of strings Optional
An array of order IDs.
merchantReference array of strings Optional
An array of merchant references.
orderReference array of strings Optional
An array of order references.
paymentMethodCategory array of strings Optional
A list of payment method categories.
Show child attributes
  • 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 string Optional
Full-text match on one of: `orderId`, `orderReference`, or `merchantReference`.
size number Optional
Number of orders to fetch. Default is 100.
status array of strings Optional
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.
Show child attributes
  • 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 strings Optional
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.
Show child attributes
  • 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 strings Optional
An array of store IDs.
{
	"lastId": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
	"noOfOrders": 1,
	"nextCursor": "MjAyMy0wOS0yMFQwNzoxODowMy41MTEwOPVa",
	"orders": [
		{
			"createdAt": "2021-09-01T11:25:32.805672147Z",
			"customer": {
				"companyId": "559311-3714",
				"companyName": "Rocket 4",
				"email": "jan@example.com",
				"firstName": "Jan",
				"lastName": "Persson",
				"phone": "+46761010101",
				"vatId": "SE559311371401"
			},
			"expiresAt": "2021-09-11T11:25:32.805672147Z",
			"id": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
			"merchantId": "ac_1xRXHKwBNxnbzMeJfy2olPJEKP7",
			"merchantReference": "xdc-345-xdk-214",
			"orderReference": "3HS2I4BJ",
			"paymentMethodCategory": "invoice",
			"status": ["fullyCaptured"],
			"storeId": "421423100",
			"totalOrderAmount": {
				"amount": "5100.00",
				"currency": "SEK",
				"formatted": "5,100.00",
				"formattedWithCurrency": "SEK 5,100.00",
				"minorUnits": 510000
			}
		}
	]
}
lastId string Deprecated
Deprecated. Use `nextCursor` instead.
nextCursor string
Use this cursor in another `GET /orders` request to fetch the next page.
noOfOrders string
The number of returned orders. Controlled by the `size` query parameter (default: 100).
orders array of orders
An array of returned orders.
Show child attributes
createdAt string
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
customer object
Customer information.
Show child attributes
companyId string Optional
Company registration number.
email string Optional
Customer email address.
firstName string Optional
Customer first name.
lastName string Optional
Customer last name.
phone string Optional
Customer phone number.
reference1 string Optional
Reference field 1.
reference2 string Optional
Reference field 2.
ssn string Optional
Social security number.
expiresAt string
A date in ISO 8601 format, for example `2011-10-05T14:48:00.000Z`.
id string
A unique identifier for the order.
merchantId string
A unique identifier for the merchant.
merchantReference string
The merchant order reference.
orderReference string
A shorter, human-friendly reference for `id`.
paymentMethodCategory string
The payment method category used for the order.
Show child attributes
  • 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.
status array of strings
A list of strings indicating the current status of the order (can be both captured and refunded, for instance).
Show child attributes
  • 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 string Optional
A unique identifier for the store where the order was created.
totalOrderAmount integer
An object containing strings `amount`, `currency`, `formatted`, `formattedWithCurrency`, and integer `minorUnits`, including VAT.