Browse Documentation
- Report
- Overview
- Organizations
- GET Get Organisation
- POST Update Organisation
- Invoices
- POST Create Invoice
- GET Get Invoice
- PUT Update Invoice
- DELETE Delete Invoice
- POST Approve Invoice
- POST Add Attachment
- DELETE Delete Attachment from Invoice
- POST Send Invoice
- POST Pay Invoice
- Purchases
- POST Create Purchase
- GET Get Purchase
- PUT Update Purchase
- DELETE Delete Purchase
- POST Approve Purchase
- POST Add Attachment to Purchase
- DELETE Delete Attachment from Purchase
- POST Pay Purchase
- Pos sales
- GET Get POS Sales
- POST Create POS Sale
- PUT Update POS Sale
- DELETE Delete POS Sale
- POST Add POSSales Payment
- Offers
- POST Create Offer
- GET Get Offer
- PUT Update Offer
- DELETE Delete Offer
- POST Add Attachment to Offer
- DELETE Delete Attachment from Offer
- POST Send Offer
- POST Convert to Invoice
- Items
- POST Create Item
- GET Get Item
- POST Update Item
- POST Add Item Picture
- DELETE Delete Item Picture
- Item categories
- Contacts
- POST Create Contact
- GET Get Contact
- PUT Update Contact
- Account types
- GET Account Types
- Accounts
- POST Create Account
- GET Get Account
- Financial accounts
- Taxes
- POST Create Tax
- GET Get Tax
- Invoice template
- GET Get Template
- POST Update Invoice Template
- POST Upload Template Logo
- POST Create New Invoice Template
- DELETE Delete Invoice Temaplate
- Inbox
- POST Upload Attachment
- GET Get Attachments
- DELETE Delete Attachment
- Payments
- DELETE Delete Payment
- Journals
- GET Get journals
- Banks
- GET List banks
- Team
- POST Create Team Member
- GET List Team Members
- DELETE Remove Team Members
POST Add item picture
Add Item Picture
POST /items/:item_id/images
Parameters
Parameter | Type | Description |
url or encoded_string | String | This is the url of the image to be uploaded or otherwise provide the base64_encoded_string of the image |
item_id | String | This is the hash value of the item you want to a picture to. |
filename | String | This is the name of the picture file. |
A POST request is expected to be sent to the above endpoint where the content body must be JSON string containing all parameters that are needed to add a picture to an item. The below example demonstrates how to add picture to the item.
REQUEST
1. UPLOAD IMAGES WITH BASE64 ENCODED STRING[You must provide Filename]
curl - s - H "Content-Type: application/json" - H "Authorization: Bearer token"\ - XPOST\ - d '{ "image": { "encoded_string": "paste image base64 code here", "filename": "sample.jpg" } }
2. UPLOAD IMAGES WITH URL[Filename is not necessary]
curl - s - H "Content-Type: application/json" - H "Authorization: Bearer token"\ - XPOST\ - d '{ "image": { "url": "https://f.accounteer.com/sample1.png" } }' \ https://app.accounteer.com/api/v0.1/item/{item_id}/images Example Request: https://app.accounteer.com/api/v0.1/item/ea5aa6f73fcb434ac9172cd6ca6b3ab560da51ee/images
RESPONSE
{ "id":"ea5aa6f73fcb434ac9172cd6ca6b3ab560da51ee", "organization_id":"63563de311606b6528fdf949b7c9128afba414d3", "title":"item name", "description":"item description", "sales_price":"120.00", "purchase_price":"100.00", "show_invoices":true, "show_purchases":true, "tax":null, "gl_account_sales":{ "id":"cd48f5ccfd5069c7e5f066404c0e372bec1ccca1", "code":"4000", "title":"Sales", "description":null }, "gl_account_purchases":{ "id":"10a2d9acddf01204756487a6775e3db1a37f1f92", "code":"6000", "title":"Productive labor", "description":null }, "item_category":null, "images":[ { "id":"f53fa136c53657367d73add5788faf818483fc28", "file_url":"https://f.accounteer.com/f53fa136c53657367d73add5788faf818483fc28/63563de311606b6528fdf949b7c9128afba414d3/test.png", "file_name":"test.png", "date_created":"2018-02-22" }, { "id":"16df7928c8c04f1e0442dc2c7931d9fed7e17bf7", "file_url":"https://f.accounteer.com/16df7928c8c04f1e0442dc2c7931d9fed7e17bf7/63563de311606b6528fdf949b7c9128afba414d3/test.png", "file_name":"test.png", "date_created":"2018-02-22" } ], "date_created":"2018-01-04", "date_updated":"2018-01-04" }
The API will return a 201 status including the complete item object to which the image was uploaded.