Barcode API

1. Authentication

This endpoint allows users to authenticate and retrieve an access token. The token is required to make subsequent API requests.

Endpoint: POST /api/auth/getToken

{
  "userKey": "...",
  "apiKey": "..."
}
Try It

Response:

2. Fetch Barcode

This endpoint allows you to fetch details about a specific barcode, including product name, pricing information, and availability.

Endpoint: POST /api/barcode

Authorization: This request requires a valid token in the Authorization header.

Authorization: Bearer ...token...

Request Payload:

{
  "barcode" : "8690632994802"
}

Response:

[
  {
    "barcode": "8690632994802",
    "text": "Nestle Kare Çikolata Damak Baklava",
    "createdDate": "2024-09-11T01:52:36.261177Z",
    "prices": [
      {
        "price": 17,
        "location": {
          "name": "Türkiye Geneli - Bilinmeyen Kaynak",
          "country": "2"
        }
      }
    ]
  }
]
Try It

Response:

3. Barcode Analysis

This endpoint analyzes the given barcode and provides details such as country of origin, manufacturer code, and product code.

Endpoint: POST /api/analysis

Authorization: This request requires a valid token in the Authorization header.

Authorization: Bearer ...token...

Request Payload:

{
  "barcode" : "8690632994802"
}

Response:

{
  "country": "Turkey",
  "manufacturerCode": 632,
  "productCode": 99480
}
Try It

Response: