Browse Documentation
POST Approve purchase

Approve Purchase

POST /purchases/:id

To approve a purchase you will need an access token, for questions regarding how to obtain an access token click on this link.

A POST request is expected to be sent to the above endpoint where the purchase id must be passed as a parameter to the purchase path. The below example demonstrates how to approve a purchase.

curl - s - H "Content-Type: application/json" - H "Authorization: Bearer token"\ -   
 XPOST\ -                

d '{  
   "purchase":{  
      "status":"approved"
   }
}'

https://app.accounteer.com/api/v0.1/purchases/0790edf9eae07453df7abdf3ef4a67ad3c72e5b8

Response

{
 "data": [
 {
  "id": "0790edf9eae07453df7abdf3ef4a67ad3c72e5b8",
  "organization_id": "520e391aa7e3bceccc5e2a9729fe0c60404140dc",
  "supplier_id": "b4df480b298db729344e27d0bc8f236b294e18df",
  "total_amount": 3675,
  "total_base_amount": 3500,
  "total_tax_amount": 175,
  "currency": "EUR",
  "issued_date": "2017-05-28",
  "due_date": "2017-05-29",
  "status": "approved",
  "reference": "Temitope",
  "items": [
     {
       "title": "Okeke Physics TextBook",
       "description": "Okeke Physics",
       "quantity": 1,
       "item_base_amount": 1500,
       "tax_id": 1b908f34bbe258f96ab6932ca832a2a4dee09c73,
       "tax_name": "5%",
       "tax_percentage": 5,
       "account_id": "53fa00e35def06ef89003af73ab0379c809d4b11",
       "gl_account": "2150 Holding account",
       "line_base_amount": 1500,
       "line_tax_amount": 75,
       "line_total_amount": 1575
    },
    {
       "title": "Macmillian Mathematics",
       "description": "Mathematics",
       "quantity": 2,
       "item_base_amount": 2000,
       "tax_id": 1b908f34bbe258f96ab6932ca832a2a4dee09c73,
       "tax_name": "5%",
       "tax_percentage": 5,
       "account_id": "53fa00e35def06ef89003af73ab0379c809d4b11",
       "gl_account": "2150 Holding account",
       "line_base_amount": 2000,
       "line_tax_amount": 100,
       "line_total_amount": 2100
    }]
      }
  ]
}