Download OpenAPI specification:
An API for Chemist4U partners to manage orders in the Connect system
Access to the API is granted via an IP whitelist, and a client_id and client_secret pair. For this reason a static IP is required from the calling system. The client_id represents you as a partner and is used to restrict access to orders that you have created.
Creates a new order for Chemist4U for fulfillment. This endpoint accepts detailed information about the order, including customer details, order items, and optional prescription details.
An order may be a none-prescription order, or maybe linked to a prescription. If linked to a prescription, the prescription details should be provided in the prescription field. Depending on the type of order, and type of items within the order, then the fulfillment workflow will be different.
If the partnerOrderId already exists with the same data, this endpoint is idempotent
and will return a 201 status with no changes.
Returns 409 if the partnerOrderId exists but the provided data conflicts.
| partnerOrderId required | string >= 5 characters |
| orderDateTime required | string <date-time> |
required | object (Customer) |
object (Prescription) | |
required | Array of objects (OrderItem) |
object (ShippingMethod) The pre-arranged shipping method to use for the Order, if not supplied then shipping option used will be as per prior agreement and the contents of the order |
{- "partnerOrderId": "99877672211",
- "orderDateTime": "2019-08-24T14:15:22Z",
- "customer": {
- "partnerCustomerId": "887986",
- "title": "Mr",
- "forename": "Martin",
- "middleName": "Jeff",
- "surname": "Davidson",
- "dob": "1980-11-24",
- "nhsNumber": 9435797881,
- "emailAddress": "test@example.com",
- "phoneNumber": "07777777771",
- "address": {
- "companyName": "Patient Workplace Limited",
- "line1": "12 Bulk Road",
- "line2": "Worksop",
- "line3": null,
- "town": "Woking",
- "county": "Nottinghamshire",
- "postcode": "S18 1DG",
- "countryCode": "GB"
}, - "generalPractitioner": {
- "odsCode": "G11990",
- "organisation": "Doctor Surgery Limited",
- "line1": "Brown Cottage",
- "line2": "10 Sky Lane",
- "line3": "Hills End",
- "town": "Christchurch",
- "county": "Surrey",
- "postcode": "TW20 0HJ",
- "countryCode": "GB"
}, - "exemption": "A"
}, - "prescription": {
- "prescriptionId": "998776722",
- "prescriptionDateTime": "2019-08-24T14:15:22Z",
- "source": "RTC",
- "icbCode": "QT152R",
- "prescriber": {
- "prescriberCode": "1111111",
- "prescriberName": "Dr John Doctor",
- "contactNumber": "07777777771",
- "surgery": {
- "odsCode": "G11990",
- "organisation": "Doctor Surgery Limited",
- "line1": "Brown Cottage",
- "line2": "10 Sky Lane",
- "line3": "Hills End",
- "town": "Christchurch",
- "county": "Surrey",
- "postcode": "TW20 0HJ",
- "countryCode": "GB"
}
}
}, - "orderItems": [
- {
- "quantity": 10,
- "itemName": "Paracetamol 500mg Tablets",
- "itemCode": "42014411000001104",
- "itemCodeType": "VMP",
- "dosageText": "Take TWO tablets DAILY",
- "price": 300
}
], - "shippingMethod": {
- "carrier": "RoyalMail",
- "carrierServiceCode": "TPM",
- "shippingCostPence": 300,
- "signedTracking": true
}
}Only orders created by the same partner as the partner using this operation can be retrieved.
This simply returns the main information about an order for verification purposes, if you wish to see the current status of an order then please use the /order/{partnerOrderId}/status endpoint.
| partnerOrderId required | string |
{- "partnerOrderId": "99877672211",
- "orderDateTime": "2019-08-24T14:15:22Z",
- "customer": {
- "partnerCustomerId": "887986",
- "title": "Mr",
- "forename": "Martin",
- "middleName": "Jeff",
- "surname": "Davidson",
- "dob": "1980-11-24",
- "nhsNumber": 9435797881,
- "emailAddress": "test@example.com",
- "phoneNumber": "07777777771",
- "address": {
- "companyName": "Patient Workplace Limited",
- "line1": "12 Bulk Road",
- "line2": "Worksop",
- "line3": null,
- "town": "Woking",
- "county": "Nottinghamshire",
- "postcode": "S18 1DG",
- "countryCode": "GB"
}, - "generalPractitioner": {
- "odsCode": "G11990",
- "organisation": "Doctor Surgery Limited",
- "line1": "Brown Cottage",
- "line2": "10 Sky Lane",
- "line3": "Hills End",
- "town": "Christchurch",
- "county": "Surrey",
- "postcode": "TW20 0HJ",
- "countryCode": "GB"
}, - "exemption": "A"
}, - "prescription": {
- "prescriptionId": "998776722",
- "prescriptionDateTime": "2019-08-24T14:15:22Z",
- "source": "RTC",
- "icbCode": "QT152R",
- "prescriber": {
- "prescriberCode": "1111111",
- "prescriberName": "Dr John Doctor",
- "contactNumber": "07777777771",
- "surgery": {
- "odsCode": "G11990",
- "organisation": "Doctor Surgery Limited",
- "line1": "Brown Cottage",
- "line2": "10 Sky Lane",
- "line3": "Hills End",
- "town": "Christchurch",
- "county": "Surrey",
- "postcode": "TW20 0HJ",
- "countryCode": "GB"
}
}
}, - "orderItems": [
- {
- "quantity": 10,
- "itemName": "Paracetamol 500mg Tablets",
- "itemCode": "42014411000001104",
- "itemCodeType": "VMP",
- "dosageText": "Take TWO tablets DAILY",
- "price": 300
}
], - "shippingMethod": {
- "carrier": "RoyalMail",
- "carrierServiceCode": "TPM",
- "shippingCostPence": 300,
- "signedTracking": true
}
}Only orders created by the same partner as the partner using this operation can be retrieved.
This endpoint will return the current order status in the system, and can be used to check the progress of fulfillment as well as to retrieve the shipping tracking code if dispatched.
| partnerOrderId required | string |
{- "partnerOrderId": "998776722",
- "lastUpdatedDateTime": "2019-08-24T14:15:22Z",
- "currentStatus": "Dispatched",
- "courier": "Royal Mail",
- "trackingNumber": "OD162124181GB"
}Only orders created by the same partner as the partner using this operation can be updated.
This endpoint allows attempting the update of an orders status if possible. This is mostly used for cancelling orders that have not yet been progressed through processing and dispatch.
| partnerOrderId required | string |
| status required | string Value: "Cancelled" |
| orderNote required | string |
{- "status": "Cancelled",
- "orderNote": "Raised in error"
}Only orders created by the same partner as the partner using this operation can be updated.
This endpoint allows uploading of an image of a prescription to an prescription order. This combines with the meta-data that is in the prescription order to allow it to be progressed.
The order must be a prescription order with the prescription field filled in, and this should be sent through soon after the order is created. If its sent through long after then the order may have already been processed.
Depending on the agreement with Chemist4U then this image may be able to be used to increase operation efficiency, may be used for verification purposes only, or maybe no required.
Alternatively a PDF can be uploaded as well with the /order/{partnerOrderId}/pdf endpoint.
| partnerOrderId required | string |
Only orders created by the same partner as the partner using this operation can be updated.
This endpoint allows uploading of a PDF file of a prescription to an prescription order. This combines with the meta-data that is in the prescription order to allow it to be progressed.
The order must be a prescription order with the prescription field filled in, and this should be sent through soon after the order is created. If its sent through long after then the order may have already been processed.
Depending on the agreement with Chemist4U then this PDF may be able to be used to increase operation efficiency, may be used for verification purposes only, or maybe no required.
Alternatively an image can be uploaded as well with the /order/{partnerOrderId}/image endpoint.
| partnerOrderId required | string |
This endpoint returns a list of all the webhooks that are registered for the partner making the request.
This can be used to verify that the webhooks are still registered, and to see what statuses are being listened for.
A webhook is a URL that Chemist4U will send a POST request to when an order status changes or product availability changes. The format of this is a work-in-progress but will be a JSON payload with the partner order ID, order status/item code, and tracking details if they exist for the order.
{- "webhooks": [
- {
- "id": "49a06f6a-2e11-4c2f-8ead-5cf56c44df56",
- "category": "OrderStatus",
- "statuses": [
- "Dispatched"
]
}
]
}This allows a partner to receive webhooks when statuses change on orders, or availability changes on a product. A webhook is a URL that Chemist4U will send a POST request to when an order status changes. The format of this is a work-in-progress but will be a JSON payload with either the partner order ID, order status, and tracking details if they exist, or the item code, item code type, and availability status.
| endpoint | string <uri> |
| authentication | string |
| category | string Enum: "OrderStatus" "ProductAvailability"
|
| statuses | Array of strings Items Enum: "Dispatched" "Cancelled" Required if webhook is a |
{- "authentication": "Work in progress",
- "category": "OrderStatus",
- "statuses": [
- "Dispatched"
]
}{- "id": "49a06f6a-2e11-4c2f-8ead-5cf56c44df56",
- "category": "OrderStatus",
- "statuses": [
- "Dispatched"
]
}| id required | string |
| endpoint | string <uri> |
| category | string Enum: "OrderStatus" "ProductAvailability"
|
| statuses | Array of strings Items Enum: "Dispatched" "Cancelled" Required if webhook is a |
{- "category": "OrderStatus",
- "statuses": [
- "Dispatched"
]
}{- "id": "49a06f6a-2e11-4c2f-8ead-5cf56c44df56",
- "category": "OrderStatus",
- "statuses": [
- "Dispatched"
]
}This endpoint returns a list of all items available in the system for the partner making the request. These are the items that can be included in orders by the partner.
[- {
- "itemCode": "42014411000001104",
- "itemCodeType": "VMP",
- "itemName": "Paracetamol 500mg Tablets",
- "available": true
}
]This endpoint returns details of a single item based on the itemCode and itemCodeType. This is an item that can be included in orders by the partner.
| itemCodeType required | string Enum: "AMP" "VMP" "SKU" |
| itemCode required | string |
{- "itemCode": "42014411000001104",
- "itemCodeType": "VMP",
- "itemName": "Paracetamol 500mg Tablets",
- "available": true
}