For a higher-level overview, see Registry.
Overview
POST /tag-associations
allows pharma manufacturers to add or associate item data (NDC, Lot Number, etc.) to previously-registered tags (EPC Layout v2).- The tag issuer code (EPC Layout v2) in each EPC will be validated against the
TagIssuer
records configured for the calling user’sAccount
. - The NDC must match a
CatalogEntry
that either belonging to the calling user’sAccount
or has been delegated to the calling user’sAccount
via aCatalogSubscription
. - The endpoint will throw an error if a user tries to create items that have the same NDC and lot number as one or more existing items, but with a different expiration.
- This endpoint should be able to handle updating 500,000 tags in less than 60 seconds.
- In the event of an error, none of the tags submitted in the API call will be updated.
Request
Method
POST {registry}/api/v1/tag-associations
Header
Example Header
http-api-key: token Content-Type: application/json
NOTE: Token should be replaced with your actual API token.
Body
Parameters
Field | Type | Description |
---|---|---|
tags | Object[] | Required. Array of tags objects. |
epc | String | Required. EPC of the tag (must be an EPC that follows the Version 2 layout).
Accepts 24 hex characters. |
ndc | String | Required. NDC of the Catalog Entry for association. |
lot | String | Required. Lot number for new tag association. |
third_party_batch_id | String | Required, accepts null. A foreign key to a batch identifier in another system, such as an ERP or labeling system. |
expiration_manufacturer | String | Required, accepts null. Manufacturer’s expiration date corresponding to these items.
Specify as YYYY-MM-DD. |
Example Body
{ "tags": [ {"epc": "800200010000000000000000"}, {"epc": "800200010000000000000001"} ], "ndc": "15082-247-70", "lot": "def456", "third_party_batch_id": "222", "expiration_manufacturer": "2019-10-14" }
Response
Header
The response header will supply a standard HTTP status code. Currently, the following are supported for application-specific errors.
- 200 OK
- 404 Not Found
- 422 Unprocessable Entity
You may still received other error codes, for example 5xx codes for Server errors. But those aren’t specific to the business logic of this endpoint.
The response header will also contain a transaction ID that can be useful for troubleshooting.
transaction-id: 32f63f5f-0936-4446-864f-8742763a80c5
Body
Example Body — 200 Success
In the event of a 200, information will be returned in the body so you can perform additional validations.
{ "tags": [ {"epc": "800200010000000000000010"}, {"epc": "800200010000000000000011"} ], "ndc": "15082-247-70", "lot": "def456", "third_party_batch_id": "222", "expiration_manufacturer": "2019-10-14" }
Example Body — 4xx and 5xx Errors
In the event of a non-200 response status (see description in Response Header above), additional information about the error can be found in the response body.
Make sure to log the error IDs so that Kit Check can help you troubleshoot more efficiently.
{ "errors" : [ { "status": 422, "detail": "A human-readable description of the error", "id": "32f63f5f-0936-4446-864f-8742763a80c5" } ] }