Version 1.1
For a higher-level overview, see Registry.
Overview
POST /tag-associations/tags
allows pharmaceutical manufacturers to register item data (NDC, Lot Number, etc.) and related tags (EPC Layout v2) at the same time.- 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 can be used to create up to 10,000 tags in a single request.
- In the event of an error, none of the tags submitted in the API call will be created.
- A JWT token will be used for authentication.
Request
Method
POST {registry}/api/v1/tag-associations/tags
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 either an EPC that follows the Version 2 layout or be a GS1 SGTIN 198-bit EPC. Accepts 24 or 52 hex characters. |
tid | String | Required. TID of the tag.
Accepts 24 hex characters. |
tag_roll_value | String | Optional. External identifier for the Tag Roll. |
ndc_full | String | Required. NDC of the Catalog Entry corresponding to these items. |
lot_number | String | Required. Lot number corresponding to these items. |
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": "800200010000000000000010", "tid": "0de6d45a1ad95e3017eff59b"}, {"epc": "800200010000000000000011", "tid": "a90a796b5a43688341318743"} ], "tag_roll_value": "roll 11", "ndc_full": "15082-247-70", "lot_number": "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. File was received and that the content is correct.
- 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", "tid": "0de6d45a1ad95e3017eff59b"}, {"epc": "800200010000000000000011", "tid": "a90a796b5a43688341318743"} ], "ndc_full": "15082-247-70", "lot": "def456", "tag_roll_value": "roll 11", "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" } ] }