get https://api.repsly.com/v3/export/purchaseorders/
Endpoint is used to export your purchase orders from Repsly. System limit is 50 rows.
More Info
In every response you will receive meta variables FirstID and LastID. Save LastID for future requests so you can use it as a parameter {lastDocumentID} for every subsequent request until the response meta variable TotalCount is equal to 0, which means you have received all updates.
To get the complete list of purchase orders, start your request with parameter {lastDocumentID} = 0.
Response definition
Name | Type | Description |
---|---|---|
MetaCollectionResult\TotalCount | Integer | Total count of purchase orders |
MetaCollectionResult\FirstID | Integer | Unique ID of the first item in the list |
MetaCollectionResult\LastID | Integer | Unique ID of the last item in the list |
PurchaseOrderID | Integer | Unique purchase order ID |
TransactionType | String (50) | Transaction type (PurchaseOrder) |
DocumentTypeID | Integer | Document type id |
DocumentTypeName | String (100) | Document type name by custom definition |
DocumentStatus | String (100) | Document status name by custom definition |
DocumentStatusID | Nullable<Integer> | Document status ID, null means status is not set |
DocumentItemAttributeCaption | String | Describes caption name of document type attributes (group name) |
DateAndTime | Datetime | Date and time of creation of this purchase order |
DocumentNo | String (50) | Document number |
ClientCode | String (50) | Unique client code |
ClientName | String (255) | Client name |
DocumentDate | Datetime | Date of this purchase order |
DueDate | Datetime | Due date of this purchase order |
RepresentativeCode | String (20) | Unique representative code (author of this purchase order) |
RepresentativeName | String (80) | Representative name (author of this purchase order) |
Item\LineNo | Integer | Position of an item |
Item\ProductCode | String (20) | Unique product code |
Item\ProductName | String (80) | Product name |
Item\UnitAmount | Decimal (18, 4) | Item unit amount |
Item\UnitPrice | Decimal (18, 4) | Item unit price |
Item\PackageTypeCode | String(45) | Packaging type code |
Item\PackageTypeName | String(40) | Packaging type |
Item\PackageTypeConversion | Integer | Packaging type conversion |
Item\Quantity | Integer | Item quantity |
Item\Amount | Decimal (18, 4) | Item amount |
Item\DiscountAmount | Decimal (18, 4) | Discount amount |
Item\DiscountPercent | Decimal (18, 4) | Discount percent |
Item\TaxAmount | Decimal (18, 4) | Tax amount |
Item\TaxPercent | Decimal (18, 4) | Tax percent |
Item\TotalAmount | Decimal (18, 4) | Total amount |
Item\Note | String (255) | Item note |
Item\DocumentItemAttributeName | String(100) | Item custom attribute name - used for tagging items with specific custom define dattributes (eg. reason of return) |
Item\DocumentItemAttributeID | Nullable<Integer> | Item custom attribute ID, null means no attribute is set to document |
SignatureURL | String (512) | Signature image URL |
Note | String (255) | Note on the purchase order |
Taxable | Boolean | Marks if this purchase order is taxable |
VisitID | Integer | Unique Visit ID |
StreetAddress | String (255) | Client street address |
ZIP | String (20) | Client ZIP code |
ZIPExt | String (20) | Client ZIP extension |
City | String (255) | Client city |
State | String (255) | Client state |
Country | String (255) | Client country |
CountryCode | String (20) | Client country code |
DocumentCustomAttributes\CustomAttributeInfoID | GUID | Custom attribute unique identifier |
DocumentCustomAttributes\Title | String (max) | Custom attribute question title |
DocumentCustomAttributes\Type | String (50) | Type can be one of the following: Text, textarea, select, decimal, date, barcode, photo |
DocumentCustomAttributes\Value | String (max) | Custom attribute question answer. For type photo this value contains GUID for photo filename on S3. By presigning this value you can access it via publicly available link.repsly.s3.amazonaws.com + value + .jpg |
OriginalDocumentNumber | String (max) | The number of the purchase order that is cancelled by this document |