Skip to content

Latest commit

 

History

History
145 lines (132 loc) · 2.6 KB

File metadata and controls

145 lines (132 loc) · 2.6 KB

Endpoints Details

4. Endpoints Details

4.1 Submit Job

Create a job to process images collected from stores. The visit_time should be in RFC3339 or ISO format.

{
  "count": 2,
  "visits": [
    {
      "store_id": "S00339218",
      "image_url": [
        "https://www.gstatic.com/webp/gallery/2.jpg",
        "https://www.gstatic.com/webp/gallery/3.jpg"
      ],
      "visit_time": "2024-01-21T16:23:40.898Z"
    },
    {
      "store_id": "S01408764",
      "image_url": ["https://www.gstatic.com/webp/gallery/3.jpg"],
      "visit_time": "2024-01-21T16:23:40.898Z"
    }
  ]
}
  • Success Response:
  • Code: 201 CREATED
  • Content Example:
{
  "job_id": 123
}
  • Error Responses:
  • Code: 400 BAD REQUEST
  • Content Example:
{
  "error": ""
}

4.2 Get Job Info

{
  "status": "completed",
  "job_id": ""
}
  • Job Status: failed
{
  "status": "failed",
  "job_id": "",
  "error": [
    {
      "store_id": "S00339218",
      "error": ""
    }
  ]
}
  • Error Responses:
  • Code: 400 BAD REQUEST
  • Content:
{}

4.3 Show Visit Info

{
  "results": [
    {
      "store_id": "S00339218",
      "area": "",
      "store_name": "",
      "data": [
        {
          "date": "",
          "perimeter": ""
        },
        {
          "date": "",
          "perimeter": ""
        }
      ]
    },
    {
      "store_id": "S01408764",
      "area": "",
      "store_name": "",
      "data": [
        {
          "date": "",
          "perimeter": ""
        },
        {
          "date": "",
          "perimeter": ""
        }
      ]
    }
  ]
}
  • Error Responses:
  • Condition: If area or storeid does not exist
  • Code: 400 BAD REQUEST
  • Content:
{
  "error": ""
}

This concludes the detailed information about the three endpoints. You can use these details to interact with the services and test the functionality.