Order Documents [API]

Description List Order Documents
Action GET
URL <your URL here>/api/order_documents
Sample ur parameters {"order_id":"104"}
Sample Successful Response [
  {
    "order_document": {
      "id": 21,
      "order_id": 104,
      "created_at": "2018-03-22T13:15:31.000+00:00",
      "updated_at": "2018-03-22T13:15:31.000+00:00",
      "file_name": "invoice.png"
    }
  },
  {
    "order_document": {
      "id": 22,
      "order_id": 104,
      "created_at": "2018-03-22T13:16:22.000+00:00",
      "updated_at": "2018-03-22T13:16:22.000+00:00",
      "file_name": "invoice.png"
    }
  },
Required parameter order_id  


Description Create Order Document
Action POST
URL <your URL here>/api/order_documents
Sample request {"order_document":{"order_id":"104","file_name":"invoice.pdf",
"file_data":"/9j4RGcRXhpAABAAAAbAAUAAAABAAAA"}}
Sample Successful Response {
  "id": 26,
  "order_id": 104,
  "created_at": "2018-03-22T13:36:29.343Z",
  "updated_at": "2018-03-22T13:36:29.343Z",
  "file_name": "invoice.pdf"
}
Required fields order_id, file_name, file_data
Notes Required for documents: file_name (the file name of the document),
file_data (base64 encoded file data)
Description Delete Order Document
Action DELETE
URL <your URL here>/api/order_documents/<order document id>
Sample Successful Response { "status": "Order document succesfully deleted" }

Still need help? Contact Us Contact Us