Create Single Purchase

This function is used to create a purchase for a customer. The purchase will be added in draft status and must be finalized before it charges against the customer account.

Query Params
string
enum

When included and set to "sideeffects" the response will include a sideeffects object showing the resulting draft invoice.

Allowed:
boolean

If true, no purchase will be created. Instead a preview purchase will be returned containing an invoicePreview object.

string

f preview is set to true and no customerId is supplied in the body, this is a way to preview the invoice in the specified currency. The currency must be configured for your Fusebill account

Body Params
int32

This is the ID of the Customer making the purchase.

taxationAddress
object

If preview=true this address is used to calculate taxes for the draft invoice preview. This allows for a tax preview without needing a customer ID.

int32
required

This is the unique ID of the product this purchase is for.

string
required

This is an override of the name of the purchase. This is customer facing and appears in Invoices. [Max Length: 2000]

double

The quantity being purchased. Used by the pricing model and price ranges to calculate the overall price. If the purchase is using tracked quantities, leave this null

double

The number of tracked items which must be on this purchase in order to be considered fulfilled. If this is not met, the purchase cannot be finalized. Cannot be used for purchases which are not tracking items.

string

This is the description of the purchase. This is customer facing and appears on Invoices. Max Length: 250 characters]

overridePriceRanges
object

The price ranges used to determine the amount to charge. For the standard pricing model, this is a single range from 0 to infinity with a single price. This is an override just for this purchase.

string
enum

Can be used to override the pricing model being used just for this purchase.

Allowed:
customFields
object

This is a list of the custom fields attached to this purchase.

discounts
object

This is a list of discounts to be applied to this purchase.

productItems
object

This is a list of the Purchase Product Items (tracked items) associated to this purchase.

couponCodes
array of strings

Each string is a coupon code instructing Fusebill which coupon should be applied to the purchase

couponCodes
earningSettings
object

Controls how this purchase earns. Defaults to the catalog options

string

The location of this purchase in Netsuite. [Max Length: 100 characters]

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json