Render purchase orders as PDF

Retrieving purchase orders in PDF format

Date Released: Oct 2014 Date Updated: Nov 2020
Supported from AccountRight Only (Cloud API only)

Retrieve purchase orders in PDF format, customers using your application can now use the same Purchase Orders PDF in AccountRight Live. Templates can either be custom designed or default ones held inside AccountRight Live. What are custom forms?

PDF Format

How to request a PDF

Firstly we need to tell the API we want to access the pdf format, this can be achieved two different ways, you can pass an additional HEADER Accept: Application/PDF or explicitly tell the API to return the PDF format at the end of your URL request ?format=pdf You only need to use one of these methods to complete successful requests.

HTTP GET is the only supported method, to make a request your URL should look like {cf_uri}/Purchase/Order/{type}/{uid}/?format=pdf&templatename=Pre-Printed P.O.

For information on templates and the templatename keyword click below.

{type} is defined as either Item, Service or Professional.
{uid} is defined as the order unique identifier in the form of a guid.

Purchase order types

Which purchase order types are supported?

Rendering purchase orders into pdf format can be processed for the Item, Service and Professional layout types. The miscellaneous order type does not have printing capabilities in AccountRight Live.

Please note: /Purchase/Order/{uid} is not supported because a template can only be uniquely identified using the purchase layout type.

{uid} is defined as the order unique identifier in the form of a guid.

Template forms

Default and custom form templates

A template parameter templatename= can be passed to explicitly tell the API which custom form to render the order with i.e. templatename=Pre-Printed P.O.. This is not mandatory to include as the purchase layout and printed form set on the supplier contact card will default instead.

If the supplier contact card does not contain a default purchase layout and printed form, the template will default to the standard AccountRight Live Plain Paper P.O. for the layout type the purchase belongs to.

Updated: To retrieve a list of purchase custom form templates (AccountRight 2014.4 cloud and desktop only) please refer to the new /Company/FormTemplate endpoint documented here

Each purchase type has it's own specific set of templates and forms that are unique to it, therefore if you create a custom form template for a purchase type of item, you cannot use this to print or render a service or professional purchase, only item.

Note: custom form template names are not case sensitive when passing through.