Skip to main content

Receipts

Shipments other suppliers sent you, and confirming what arrived.

List incoming shipments

GET https://api.dawatrack.com/partner-api/v1/receipts/incoming/

Shipments other suppliers on DawaTrack sent your supplier account, newest first.

Scope batches:read Limit 5,000 per day

Your credential must belong to an API account linked to a supplier account; otherwise 403, as for confirming one.

status=waiting (the default) lists shipments with no confirmed receipt; status=all lists every one, with received_quantity once confirmed.

Query parameters

  • ordering string Optional

    Which field to use when ordering the results.

  • page integer Optional

    A page number within the paginated result set.

  • page_size integer Optional

    Number of results to return per page.

  • search string Optional

    A search term.

  • status string Optional

    waiting (default): not yet confirmed; all: every shipment.

Example request

curl -X GET https://api.dawatrack.com/partner-api/v1/receipts/incoming/ \
  -H "Authorization: Bearer $DAWATRACK_TOKEN"
import requests

token = "..."  # from POST /oauth/token/
response = requests.get(
    "https://api.dawatrack.com/partner-api/v1/receipts/incoming/",
    headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/receipts/incoming/", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${token}`,
  },
});
console.log(await response.json());

Response fields

A page of results. These are the fields of each item in results. See Pagination.

  • shipment_id integer
  • gtin string

    The product's GS1 GTIN, as 14 digits.

  • batch_number string

    The batch or lot number.

  • quantity integer

    Units the sender declared.

  • expiry_date string Read-only

    The lot's expiry, as its owner recorded it.

  • manufacture_date string Read-only

    The lot's manufacture date, or blank.

  • sender_name string Read-only
  • medicine_name string Read-only

    The product's name.

  • shipped_at datetime
  • received_quantity integer or null Read-only

    Units confirmed, or null if not yet.

  • recall object or null Read-only

    The open recall of this lot, or null. Receive it all the same, and hold the stock.

    • recall_id integer
    • action enum

      quarantine: hold the stock; don't sell, dispense or ship it, and return it as the recall instructs. caution: a caution-in-use alert; the stock may be used following the instructions.

      Possible values: quarantinecaution
    • classification string
    • reason string
    • instructions string

      What facilities should do.

    • issued_by string
    • issued_at datetime

Example response

JSON
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "shipment_id": 1,
      "gtin": "06164004321562",
      "batch_number": "BTH-2026-041",
      "quantity": 2600,
      "expiry_date": "expiry_date",
      "manufacture_date": "manufacture_date",
      "sender_name": "sender_name",
      "medicine_name": "Amoxicillin 500 mg capsules",
      "shipped_at": "2026-10-10T09:00:00Z",
      "received_quantity": 1,
      "recall": {
        "recall_id": 42,
        "action": "quarantine",
        "classification": "classification",
        "reason": "CONTAMINATION",
        "instructions": "Quarantine the batch and await collection instructions.",
        "issued_by": "issued_by",
        "issued_at": "2026-10-10T09:00:00Z"
      }
    }
  ]
}

Status codes

200OK
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
429Rate limit exceeded

Confirm a receipt

POST https://api.dawatrack.com/partner-api/v1/receipts/

Record what arrived of a shipment another supplier sent you: one RECEIVE event linked to their SHIP.

Scope events:write Production credentials only Limit 5,000 per day

shipment_id is from GET /receipts/incoming/. A shipment not addressed to your supplier account is 404.

quantity can be less than declared, with a note saying what happened; more than declared is 400. Each shipment is confirmed once.

The same confirmation as the supplier portal's Receiving screen: either one counts. Production credentials only.

Request body

JSON. Send Content-Type: application/json.

  • shipment_id integer Required
  • quantity integer Required

    Units that arrived; at most what was declared.

  • note string Optional

    Required when fewer units arrived.

Example request

curl -X POST https://api.dawatrack.com/partner-api/v1/receipts/ \
  -H "Authorization: Bearer $DAWATRACK_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "shipment_id": 123,
    "quantity": 30,
    "note": ""
  }'
import uuid
import requests

token = "..."  # from POST /oauth/token/
response = requests.post(
    "https://api.dawatrack.com/partner-api/v1/receipts/",
    headers={"Authorization": f"Bearer {token}", "Idempotency-Key": str(uuid.uuid4())},
    json={
      "shipment_id": 123,
      "quantity": 30,
      "note": ""
    },
)
response.raise_for_status()
print(response.json())
const token = "..."; // from POST /oauth/token/
const response = await fetch("https://api.dawatrack.com/partner-api/v1/receipts/", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${token}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "shipment_id": 123,
    "quantity": 30,
    "note": ""
  }),
});
console.log(await response.json());

Response fields

  • event_id integer
  • shipment_id integer
  • gtin string

    The product's GS1 GTIN, as 14 digits.

  • batch_number string

    The batch or lot number.

  • quantity integer

    The number of units.

  • occurred_at datetime

    When the event happened.

  • recall object or null Read-only

    The open recall of this lot, or null. The receipt is recorded; hold the stock.

    • recall_id integer
    • action enum

      quarantine: hold the stock; don't sell, dispense or ship it, and return it as the recall instructs. caution: a caution-in-use alert; the stock may be used following the instructions.

      Possible values: quarantinecaution
    • classification string
    • reason string
    • instructions string

      What facilities should do.

    • issued_by string
    • issued_at datetime

Example response

JSON
{
  "event_id": "5c0e7d2a-91b4-4f63-8a27-0d4e6b9c1f35",
  "shipment_id": 1,
  "gtin": "06164004321562",
  "batch_number": "BTH-2026-041",
  "quantity": 2600,
  "occurred_at": "2026-10-10T09:00:00Z",
  "recall": {
    "recall_id": 42,
    "action": "quarantine",
    "classification": "classification",
    "reason": "CONTAMINATION",
    "instructions": "Quarantine the batch and await collection instructions.",
    "issued_by": "issued_by",
    "issued_at": "2026-10-10T09:00:00Z"
  }
}

Status codes

201Created
400The request is invalid, for example a malformed GTIN or a missing field
401No valid access token
403Your credential lacks the scope, partner type or environment this needs
404Not found, or not visible to your credential
409Conflict: a request with this Idempotency-Key is in progress, or the record already exists
429Rate limit exceeded

Partner API v1. The API reference is generated from the API's own code.