Browse Documentation
POST Upload template logo

Add Logo

POST /invoice_templates/:template_id/logo

Parameters

ParameterTypeDescription
url or encoded_stringStringThis is the url of the image to be uploaded or otherwise provide the base64_encoded_string of the image
template_idStringThis is the hash value of the invoice_template you want to a logo to.
filenameStringThis 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 logo to an invoice template. The below example demonstrates how to add logo.

REQUEST

1. UPLOAD LOGO 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_logo.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/sample_logo.jpg"
   }
}' \
https://app.accounteer.com/api/v0.1/invoice_templates/{template_id}/logo

Example Request:
https://app.accounteer.com/api/v0.1/invoice_templates/b64189c2acbe783fa76856087d5193b4b161fcbd/logo

      


RESPONSE

{
    "id": "9db72d7ab068b8ac4cf4e52ed0b17fc449a397ad",
    "organization_id": "9a3a10a3515ac8ab664fc3311ffc8c9f3259e38b",
    "template_name": "Business Standard",
    "language": "fr",
    "days_due": 40,
    "invoice_title": "INVOICE",
    "logo_url":""https://f.accounteer.com/9a3a10a3515ac8ab664fc3311ffc8c9f3259e38b/70945f9be9                 063109a310e84683f2677f8fe269e4/sample_logo.jpg"
    "creditnote_title": "CREDIT NOTE",
    "offer_title": "OFFER",
    "payment_instruction": null,
    "payment_receipt_title": "PAYMENT RECEIPT",
    "payment_receipt_message": null,
    "payment_receipt_sms_message": null,
    "terms": "Pay in 30days",
    "default": true,
    "accent_color": "#0088cc",
    "mail_offer": null,
    "subject_offer": "Test Subject Offer",
    "mail_invoice": null,
    "subject_invoice": "Test Subject Invoice",
    "mail_creditnote_out": "Test mail credit note note",
    "subject_creditnote_out": "Test subject credit note note",
    "mail_purchase_order": "Test mail purchase order",
    "subject_purchase_order": "Test subject purchase order",
    "vat_title": "VAT",
    "vat": null,
    "phone": null,
    "email": null,
    "country": null,
    "fax": null,
    "currency": "EUR"
}

The API will return a 201 status including the complete item object to which the logo was uploaded.