Purchase_GET

Purchase_GET

The Purchase resource allows getting detailed info about Purchase. This is how you call it:

  • /Purchase/<ID> - returns details of a particular purchase;

 

The full range of URIs and HTTP Verbs supported are:

Operation

HTTP Action

View any Purchase

GET /Purchase/{id}

Void Purchase

DELETE /Purchase/{id}

 

Available Fields for Purchase:

Property

Type

Length

Required

Notes

ID

Guid

 

 

Unique Cin7 Core Purchase ID

Supplier

String

256

Yes

Supplier name

SupplierID

Guid

 

Yes

Identifier of Supplier

Contact

String

256

 

Supplier Contact name

Phone

String

50

 

Supplier Contact phone

InventoryAccount

String

50

 

Account code used by default for invoice lines when no Inventory account is defined on Product. By default Inventory Control Account is used from account mapping.

BlindReceipt

Boolean

 

 

“True” if there is no order in the purchase. “False” is default

Approach

String

10

Yes

“INVOICE” for “Invoice  First”, or “STOCK” for “Stock First”

VendorAddress

Structured

 

 

Purchase Vendor address, see below

ShippingAddress

Structured

 

 

Purchase Shipping address, see below

BaseCurrency

String

3

Yes

3 character currency code of Base Currency defined in General Settings on the moment when Purchase was created.

SupplierCurrency

String

3

Yes

3 character currency code of Supplier Currency defined in Supplier card at the moment when Supplier is selected for the Purchase.

TaxRule

String

50

Yes

Default Tax Rule name selected for Purchase

TaxCalculation

String

 

Yes

“Inclusive” or “Exclusive”

Terms

String

256

Yes

Payment terms name

RequiredBy

Date

 

 

Date when shipment is due

Location

String

256

 

Default location to store stock to

Note

String

1024

 

Custom Purchase note

OrderNumber

String

256

 

Represents Purchase Order Number

Status

String

20

 

Read-only. Purchase Status, see below for possible values

RelatedDropShipSaleTask

Guid

 

 

Read-only. ID of SaleTask this drop-ship purchase is related to.

CurrencyRate

Decimal

Up to 5 decimal places

Yes

Conversion Rate expressed as number of Base currency units for one Supplier currency unit

Order

Structured

 

Yes

Purchase Order, see below

StockReceived

Structured

 

 

Purchased and received items, see below

Invoice

Structured

 

Yes

Purchase Invoice, see below.

CreditNote

Structured

 

 

Purchase Credit Note, see below

LastUpdatedDate

datetime

 

 

Date and time when purchase task was created of last time modified

AdditionalAttributes

Structured

 

 

Purchase Additional Attributes, see below

Available Purchase Statuses:

Status

Description

DRAFT

No data added to Purchase details.

VOIDED

Task has been voided

ORDERING

OrderStatus = DRAFT

ORDERED

OrderStatus = AUTHORISED

RECEIVING

OrderStatus = AUTHORISED, StockReceivedStatus = DRAFT

RECEIVED

StockReceivedStatus = AUTHORISED

INVOICED

InvoiceStatus = AUTHORISED

CREDITED

CreditNoteStatus = AUTHORISED

COMPLETED

InvoiceStatus =AUTHORISED, StockReceivedStatus = AUTHORISED

Available Fields for VendorAddress and ShippingAddress:

Property

Type

Length

Required

Notes

DisplayAddressLine1

String

256

 

Address Line 1 as displayed on Purchase form. = Line1 + Line2

DisplayAddressLine2

String

256

 

Address Line 2 as displayed on Purchase form. = City + State/Region + Zip/Postcode + Country

Line1

String

256

 

 

Line2

String

256

 

 

City

String

256

 

 

State

String

256

 

 

Postcode

String

20

 

 

Country

String

32

 

 

 

Available Fields for Order:

Property

Type

Length

Required

Notes

Memo

String

1024

 

Purchase Order memo

Date

Date

 

 

Purchase Order Date

Status

String

20

Yes

Purchase Order status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”

Lines

Array of OrderLine

 

 

Order  Lines, see below

AdditionalCharges

Array of AdditionalCharge

 

 

Order  Additional Charges, see below

Prepayments

Array of Prepayment

 

 

Prepayments, see below

TotalBeforeTax

Money

 

Yes

Order  Total before taxes in Supplier Currency

Tax

Money

 

Yes

Order  Total Tax in Supplier Currency

Total

Money

 

Yes

Order  Total (TotalBeforeTax + Tax) in Supplier Currency

 

Available Fields for StockReceived:

Property

Type

Length

Required

Notes

Status

String

20

Yes

Purchase StockReceived status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”

Lines

Array of StockReceivedLine

 

 

Lines stock received, see below

 

Available Fields for Unstock:

Property

Type

Length

Required

Notes

Status

String

20

Yes

Purchase Unstock status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”

Lines

Array of UnstockLine

 

 

Lines unstock, see below

 

Available Fields for Invoice:

Property

Type

Length

Required

Notes

Status

String

20

Yes

Invoice status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”, “PAID”

InvoiceDate

Date

 

 

Date when invoice created. Default value is current date, used if not specified

InvoiceDueDate

Date

 

 

Date until invoice is valid. If not specified, used default value from Terms

Lines

Array of InvoiceLine

 

 

Invoice Lines, see below

AdditionalCharges

Array of InvoiceAdditionalCharge

 

 

Invoice Additional Charges, see below

Payments

Array of Payment

 

 

All invoice payments, see below

TotalBeforeTax

Money

 

Yes

Invoice Total before taxes in Supplier Currency

Tax

Money

 

Yes

Invoice Total Tax in Supplier Currency

Total

Money

 

Yes

Invoice Total (TotalBeforeTax + Tax) in Supplier Currency

Paid

Money

 

Yes

Invoice Paid Total in Supplier Currency

 

Available Fields for CreditNote:

Property

Type

Length

Required

Notes

Status

String

20

Yes

Credit Note status. Possible values are “VOIDED”, “DRAFT”, “AUTHORISED”, “NOT AVAILABLE”

CreditNoteDate

Date

 

 

 

Lines

Array of CreditNoteLine

 

 

Credit Note Lines, see below

AdditionalCharges

Array of CreditAdditionalCharge

 

 

Credit Note Additional Charges, see below

Refunds

Array of Refund

 

 

All credit note refunds, see below

Unstock

Structured

 

 

See above

TotalBeforeTax

Money

 

Yes

Credit Note Total before taxes in Supplier Currency

Tax

Money

 

Yes

Credit Note Total Tax in Supplier Currency

Total

Money

 

Yes

Credit Note Total (TotalBeforeTax + Tax) in Supplier Currency

Refunded

Money

 

Yes

Credit Note refunded Total in Supplier Currency

 

Available Fields for Order Line:

Property

Type

Length

Required

Notes

ProductID

Guid

 

Yes

Unique ID of the product referenced by this Order  Line

SKU

String

50

Yes

Product SKU

Name

String

256

 

Read-only. Product name

Quantity

Decimal with up to 4 decimal places

 

Yes

 

Price

Decimal with up to 4 decimal places

 

Yes

Price per unit in Supplier currency

Discount

Decimal with up to 2 decimal places

 

Yes

Discount. Value between 0 and 100. For free items discount is 100

Tax

Decimal with up to 4 decimal places

 

Yes

Calculated Tax value in Supplier currency

Total

Decimal with up to 2 decimal places

 

Yes

Line Total in Supplier currency. Can include Tax if Tax Rule for Purchase is Tax Inclusive

TaxRule

String

50

Yes

Line Tax Rule name

Comment

String

256

 

 

SupplierSKU

String

 

 

Supplier’s product Code

 

Available Fields for Order AdditionalCharge:

Property

Type

Length

Required

Notes

Description

String

256

Yes

Additional charge description

Reference

String

256

 

Reference

Amount

Decimal with up to 4 decimal places

 

Yes

Charge amount in Supplier currency

Discount

Decimal with up to 2 decimal places

 

Yes

Discount. Value between 0 and 100. For free items discount is 100

Tax

Decimal with up to 4 decimal places

 

Yes

Calculated Tax value in Supplier currency

Total

Decimal with up to 2 decimal places

 

Yes

Additional Charge line total in Supplier currency. Can include Tax if Tax Rule for Purchase is Tax Inclusive

TaxRule

String

50

Yes

Additional Charge Tax Rule name

 

Available Fields for Payment, Refund and Prepayment:

Property

Type

Length

Required

Notes

Reference

String

50

 

Payment reference number

Amount

Money

 

Yes

Payment amount in Supplier currency

DateCreated

Date

 

Yes

Date when payment was created

DatePaid

Date

 

Yes

Date when payment has been made

Account

String

50

Yes

Account Code of the Bank account

CurrencyRate

Decimal with up to 5 decimal places

 

Yes

Currency Conversion rate expressed as number of Base currency units for one Supplier currency unit. Equals 1 when Supplier currency is the same as base currency.

 

Available Fields for StockReceivedLine, UnstockLine:

Property

Type

Length

Required

Notes

ProductID

Guid

 

Yes

Unique ID of the product referenced by this Line

SKU

String

50

Yes

Product SKU

Name

String

256

 

Read-only. Product name referenced by this Line

Location

String

256

Yes

Location where the product would be stock to/from

Quantity

Decimal with up to 4 decimal places

 

Yes

 

DateReceived

Date

 

 

Date when items were received

SupplierSKU

String

 

 

Supplier product code

IsReceived

bool

 

Yes

Flag, which indicates if items were received

Batch

String

50

 

Batch or Serial Number

ExpiryDate

Date

 

 

Date when selected Batch expires

 

Available Fields for InvoiceLine:

Property

Type

Length

Required

Notes

ProductID

Guid

 

Yes

Unique ID of the product referenced by this Line

SKU

String

50

Yes

Product SKU

Name

String

256

Yes

Product name referenced by this Line

Quantity

Decimal with up to 4 decimal places

 

Yes

 

Price

Decimal with up to 4 decimal places

 

Yes

Price per unit in Supplier currency

Discount

Decimal with up to 2 decimal places

 

Yes

Discount. Value between 0 and 100. For free items discount is 100

Tax

Decimal with up to 4 decimal places

 

Yes

Calculated Tax value in Supplier currency

Total

Decimal with up to 2 decimal places

 

Yes

Line Total in Supplier currency. Can include Tax if Tax Rule for Purchase is Tax Inclusive

TaxRule

String

50

Yes

Line Tax Rule name

Account

String

50

Yes

 

Comment

String

256

 

 

SupplierSKU

String

 

 

Supplier’s product code

 

Available Fields for InvoiceAdditionalCharge and CreditNoteAdditionalCharge:

Property

Type

Length

Required

Notes

Description

String

256

Yes

Additional charge description

Amount

Decimal with up to 4 decimal places

 

Yes

Charge amount in Supplier currency

Reference

String

256

 

Reference

Discount

Decimal with up to 2 decimal places

 

Yes

Discount. Value between 0 and 100. For free items discount is 100

Tax

Decimal with up to 4 decimal places

 

Yes

Calculated Tax value in Supplier currency

Total

Decimal with up to 2 decimal places

 

Yes

Additional Charge line total in Supplier currency. Can include Tax if Tax Rule for Purchase is Tax Inclusive

TaxRule

String

50

Yes

Additional Charge Tax Rule name

Account

String

50

Yes

 

 

Available Fields for CreditNoteLine:

Property

Type

Length

Required

Notes

ProductID

Guid

 

Yes

Unique ID of the product referenced by this Line

SKU

String

50

Yes

Product’s SKU

Name

String

256

 

Read-only. Product name referenced by this Line

Quantity

Decimal with up to 4 decimal places

 

Yes

 

Price

Decimal with up to 4 decimal places

 

Yes

Price per unit in Supplier currency

Discount

Decimal with up to 2 decimal places

 

Yes

Discount. Value between 0 and 100. For free items discount is 100

Tax

Decimal with up to 4 decimal places

 

Yes

Calculated Tax value in Supplier currency

Total

Decimal with up to 2 decimal places

 

Yes

Line Total in Supplier currency. Can include Tax if Tax Rule for Purchase is Tax Inclusive

TaxRule

String

50

Yes

Line Tax Rule name

Account

String

50

Yes

 

Comment

String

256

 

 

 

Available Fields for AdditionalAttributes:

Property

Type

Length

Required

Notes

AdditionalAttribute1

String

256

 

Additional Attribute 1 value

AdditionalAttribute2

String

256

 

Additional Attribute 2 value

AdditionalAttribute3

String

256

 

Additional Attribute 3 value

AdditionalAttribute4

String

256

 

Additional Attribute 4 value

AdditionalAttribute5

String

256

 

Additional Attribute 5 value

AdditionalAttribute6

String

256

 

Additional Attribute 6 value

AdditionalAttribute7

String

256

 

Additional Attribute 7 value

AdditionalAttribute8

String

256

 

Additional Attribute 8 value

AdditionalAttribute9

String

256

 

Additional Attribute 9 value

AdditionalAttribute10

String

256

 

Additional Attribute 10 value

Was this article helpful?

Have more questions? Submit a request