POST
/
inventory
/
ingestion
/
csv
curl --request POST \
  --url https://api-staging.luladelivery.store/inventory/ingestion/csv \
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "id": 330,
    "store_id": "7e3154b3-9460-4c68-802c-0f7122cb7a58",
    "original_file_path": "s3://lula-inventory-service-staging/Upsert/Input_files/Json_files/7e3154b3-9460-4c68-802c-0f7122cb7a58/9f1bacb2-55cc-4abe-8aac-12e6e54a74d8.json",
    "status": "pending",
    "created_by": "unknown",
    "updated_by": "unknown",
    "updated_at": "2023-07-15T12:53:27.693Z",
    "created_at": "2023-07-15T12:53:27.693Z",
    "validate_file_path": null,
    "oneschema_embed_id": null
}

All items will be validated using our validation rules. Only items that pass all rules will be inserted.

Body

file
file
required
store_id
string
required

Response

id
number

The id of the job which ingests the JSON file.

store_id
string

The store id for which the JSON file has been uploaded.

original_file_path
string

The S3 url where the JSON file has been uploaded.

status
string

The status of the job.

  • importing: The job's CSV is filed is being imported (only applies to CSV ingestion)
  • pending: The job is in the queue and will start being processed soon
  • processing: The job is being processed
  • validation_failed: The job finished but at least one item failed validation
  • success: The job finished and all items were successfully created, updated or removed
  • error: An unexpected error occurred when processing the job. Please contact us
created_by
string

The user by which the job was created.

updated_by
string

The user by which the job was updated.

updated_at
datetime

The timestamp at which the job is updated.

created_at
datetime

The timestamp at which job was created.

validate_file_path
string

The updated JSON file, after applying validations.

oneschema_embed_id
number

Not applicable

{
    "id": 330,
    "store_id": "7e3154b3-9460-4c68-802c-0f7122cb7a58",
    "original_file_path": "s3://lula-inventory-service-staging/Upsert/Input_files/Json_files/7e3154b3-9460-4c68-802c-0f7122cb7a58/9f1bacb2-55cc-4abe-8aac-12e6e54a74d8.json",
    "status": "pending",
    "created_by": "unknown",
    "updated_by": "unknown",
    "updated_at": "2023-07-15T12:53:27.693Z",
    "created_at": "2023-07-15T12:53:27.693Z",
    "validate_file_path": null,
    "oneschema_embed_id": null
}