Order History
Orders that have been made by a given customer.
Each Order is a completed booking that the customer has made using Checkout. Each Order will contain one or more OrderItems - each is a session or booked out facility. For each Order, there is a generated receipt that customers can view. Orders are sorted in descending order by order date with the most recently completed Orders appearing first in the list.
This is useful to provide customers with a history of Orders that they have made and actions for each Order e.g. viewing receipts, cancelling orders, etc.
Headers
X-API-KEY
must be provided when making the request to this endpoint. This authorizes you to access the API for your customers.
Request
GET https://book.imin.co/api/v2/orders?customerIdentifier={customerIdentifier}&page={page}
This request must be made Server-side. Otherwise, it would be possible to view the secret API key with a browser.
The customerIdentifier
parameter is the imin customer identifier that was created when you called our POST /customers
endpoint with the customer in question
The page
parameter specifies which page of Orders
is returned
Response
An example 200 response looks like:
{
"@context": [
"https://openactive.io/",
"https://schema.imin.co/",
"https://openactive.io/ns-beta"
],
"id": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page=1",
"type": "imin:RestrictedCollection",
"imin:totalItems": 1917,
"view": {
"id": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page=1",
"type": "PartialCollectionView",
"first": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page=1",
"last": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page=192",
"imin:currentPage": 1,
"imin:itemsPerPage": 10,
"imin:totalPages": 192,
"urlTemplate": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page={page}",
"next": "https://book.imin.co/api/v2/orders?customerIdentifier=1234&page=2"
},
"imin:item": [{
"type": "Order",
"@context": [
"https://openactive.io/",
"https://openactive.io/ns-beta"
],
"id": "https://book.imin.co/api/v2/orders/0bac05e5-b207-4794-80b8-6c94211643c5",
"identifier": "0bac05e5-b207-4794-80b8-6c94211643c5",
"orderStatus": "OrderDelivered",
"orderDate": "2022-11-15T15:24:26Z",
"imin:receipt": [{
"type": "Invoice",
"url": "https://book.imin.co/api/v2/receipts/1",
"dateCreated": "2021-04-30T11:42:47.813766+01:00"
}],
"seller": {
"type": "Organization",
"id": "http://kinetic-insight.com",
"termsOfService": [{
"type": "PrivacyPolicy",
"name": "Privacy Policy",
"url": "http://opendata.kinetic-insight.com/privacy-policy"
},
{
"type": "TermsOfUse",
"name": "Terms and Conditions",
"url": "http://opendata.kinetic-insight.com/terms-and-conditions"
}
]
},
"orderedItem": [{
"type": "OrderItem",
"id": "https://book.imin.co/api/v2/orders/0bac05e5-b207-4794-80b8-6c94211643c5/order-items/abcd",
"identifier": "abcd",
"orderedItem": {
"type": "ScheduledSession",
"id": "https://search.imin.co/events-api/v2/scheduled-sessions/http%3A%2F%2Fopendata.kinetic-insight.com%2Fapi%2Ffeeds%2Fscheduled-sessions%2F00000000000000000269",
"identifier": "http://opendata.kinetic-insight.com/api/feeds/scheduled-sessions/00000000000000000269",
"eventStatus": "https://schema.org/EventScheduled",
"startDate": "2020-01-16T10:00:00+00:00",
"endDate": "2020-01-16T11:00:00+00:00",
"superEvent": {
"type": "SessionSeries",
"location": {
"type": "Place",
"identifier": "2476",
"name": "test venue",
"url": "http://opendata.kinetic-insight.com/venues/2476",
"geo": {
"type": "GeoCoordinates",
"latitude": -2.235037,
"longitude": -0.1692925
},
"address": {
"type": "PostalAddress",
"addressLocality": " 3 Dale Street",
"postalCode": "m1 1ba",
"addressRegion": " Manchester",
"addressCountry": "GB",
"streetAddress": "Flat 3"
}
},
"superEvent": {
"type": "EventSeries",
"name": "test sss",
"organizer": {
"type": "Organization",
"id": "http://kinetic-insight.com",
"name": "kinetic-insight",
"sameAs": [
"https://www.facebook.com/kineticinsight/",
"https://twitter.com/kineticinsight"
],
"url": "http://kinetic-insight.com",
"logo": {
"type": "ImageObject",
"url": "http://kinetic-insight.com/wp-content/uploads/2017/05/KI-LOGO-WEB-K-ONLY-.png"
},
"telephone": "0800 808 9004",
"email": "[email protected]"
}
}
},
"duration": "PT1H",
"maximumAttendeeCapacity": 10,
"remainingAttendeeCapacity": 9
},
"orderItemStatus": "https://openactive.io/OrderItemConfirmed",
"acceptedOffer": {
"type": "Offer",
"id": "http://opendata.kinetic-insight.com/api/feeds/offers/ki-adult",
"name": "ki-adult",
"price": 10,
"priceCurrency": "GBP",
"latestCancellationBeforeStartDate": "P1D",
"validFromBeforeStartDate": "P6D"
},
"allowCustomerCancellationFullRefund": true,
"unitTaxSpecification": [{
"type": "TaxChargeSpecification",
"name": "VAT",
"price": 0,
"priceCurrency": "GBP",
"rate": 0
}],
"accessPass": [{
"@type": "Barcode",
"text": "EXT12345678901234567"
}],
"imin:isPresentlyCancellable": true
}],
"orderNumber": "29",
"broker": {
"type": "Organization",
"name": "LukeTestOrg",
"description": "A fitness app for all the community",
"url": "https://imin.co/luke-test-org",
"address": {
"type": "PostalAddress",
"addressLocality": "Madeupsville",
"postalCode": "TS4 3AE",
"addressRegion": "Middlesbrough",
"addressCountry": "GB",
"streetAddress": "123 Fake Street"
},
"logo": {
"type": "ImageObject",
"url": "https://gorillafund.org/wp-content/uploads/2019/12/ISA-chesbeat-2nd-sequence-14-NOV-13-KRC-Vecellio1511-1024x683.jpg"
}
},
"customer": {
"type": "Person",
"telephone": "020 811 8055",
"email": "[email protected]",
"givenName": "Eheuheu",
"familyName": "Eheuheu"
},
"bookingService": {
"type": "BookingService",
"id": "https://partnerportal.mcractive.com",
"name": "MCRactive Partner Portal"
},
"brokerRole": "https://openactive.io/AgentBroker",
"payment": {
"type": "Payment",
"identifier": "ch_1Aq7JRKfrmweGdVCi3JpPkEd",
"name": "Stripe payment"
},
"totalPaymentDue": {
"type": "PriceSpecification",
"price": 10,
"priceCurrency": "GBP"
},
"totalPaymentTax": [{
"type": "TaxChargeSpecification",
"name": "VAT",
"price": 0,
"priceCurrency": "GBP",
"rate": 0
}]
}]
}
Key fields:
view
shows the total number of pages and helpful pages likeprevious
,next
andlast
imin:item
is the array ofOrder
relating to the customer, ordered byorderDate
in descending order.orderedItem
is theOrderItem
for theOrder
orderedItem.orderedItem
is theScheduledSession
orFacilityUseSlot
for thatOrder
imin:receipt
is an Array of Invoices, sorted such that the most recent receipt is the first item in the array of Invoices. If no imin:receipt attribute is present on the Order, that means no receipts exist for this order.confirmationNumber
is the confirmation number for thatOrder
Last updated