Skip to content

Error and bulk responses #891

@johnzuk

Description

@johnzuk

I want to clarify bulk responses error http codes.

Let's assume i want process multiple vehicles through agency/vehicles endpoint - lets say 3 of them. Lets say first vehicle is already registered, second one has wrong type in filed device_id and third one is correct.
What should be api response and http code in that case? Should it be 409 or 400 or 201 and response like:

{
  "success": 1,
  "total": 3,
  "failures": [
  ... //all details here abut failures  
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    AgencySpecific to the Agency APIdocumentationdocumentation change can be for code and/or markdown pagesminor updateA change that is minor and should require little discussion, or is a maintenance/readme/typo update.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions