(Quick Reference) Service: Create a reason

Description: Returns the created reason in json format when successful. Returns a json response, describing the failure condition when unsuccessful.



Method: POST

Request content type: application/json


NameDescriptionTypeRequiredExample values
name Stringyes 
typeShould be equal to 1 for no sale or 2 for free invoice or 3 for warehouse transactionIntegeryes1,2,3
isActiveBy default, it is set to trueBooleannotrue, false

Success Output

Status: HTTP/1.1 201 Created

  "id": 7,
  "name": "Closed point of sale",
  "type": "1",
  "isActive": true,
  "organization": "entity1",
  "dateCreated": "2016-08-22T11:06:20Z",
  "lastUpdated": "2016-08-22T11:06:20Z"

Failure Output

Status: HTTP/1.1 400 Bad Request

  "error": "missing_param",
  "error_description": "name parameter is missing"