Evidencity REST API Documentation

/docs/v1/orders/post.md

Create new Evidencity order

Submit a new order to Evidencity

URL : /api/v1/orders

Method : POST

Auth required : YES

Permissions required : role: customer

Data constraints

Provide name of Order, Country, Product, and required information for Subject.

{
   "name": "<order name or title>",
   "country": "<3-digit-country-code>",
   "product": "<product-id>",
   "subject": {
     "name": "",
   }
}

Data example All fields must be sent.

{
   "name": "My test order",
   "country": "usa",
   "product": "E1",
   "subject": {
     "name": "Juan Castillo"
   }
}

Success Response

Condition : If everything is OK and order was successfully created.

Code : 201 CREATED

Content example

{
   "id": 123,
   "name": "Order '' has been created.",
   "url": "http://rest.evidencity.com"
}

Error Responses

Condition : If no authentication was provided (empty Authorization header)

Code : 401 Unauthorized

Headers : Authorization: Bearer <JWT from auth.evidencity.com>

Content : {}

Or

Condition : Authorization has expired

Code : 401 Unauthorized

Content example

{
   "name": [
       "JWT is not valid - expired."
   ]
}