Skip to main content
PUT
Update SalesOrderV2 record

Authorizations

X-API-KEY
string
header
required

Headers

Idempotency-Key
string

Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.

Maximum string length: 255

Path Parameters

record_number
integer
required

The number attribute of the record.

Body

application/json
memo
string
required
date
string<date>
required
company_id
integer
required
customer_id
integer
required
currency_iso_4217_code
enum<string>
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
YER,
ZAR,
ZMW,
ZWL
exchange_rate
required
items
PublicSalesOrderItemIn · object[]
required
supply_date
string<date> | null

Tax point date for VAT and GST.

When the saved record uses a VAT or GST tax regime and you omit this field, DualEntry sets it to transaction_date, or to date when there is no transaction_date.

Recurring templates store the value you send. Each generated record that uses VAT or GST and has no supply date gets that default on save.

On PATCH, an omitted field keeps the stored value. Send supply_date again when you change date or transaction_date.

place_of_supply
string | null
Maximum string length: 2
tax_registration_numbers
TaxRegistrationNumbersSnapshot · object | null
tax_metadata
object | null
bill_to_address
string | null
default:""
deprecated

Deprecated: send the structured billing_address / shipping_address instead.

ship_to_address
string | null
default:""
deprecated

Deprecated: send the structured billing_address / shipping_address instead.

billing_address
AddressSchemaIn · object | null
shipping_address
AddressSchemaIn · object | null
custom_fields
Custom Fields · object[] | null
auto_calculate_tax
enum<string> | null

Configures how to handle automatic tax calculations.

If auto_calculate_tax is unset, the tax you send on each line is stored. Set it to required to have DualEntry calculate the tax, replacing the tax on every line before it saves the record.

The calculation covers native US sales tax using DualEntry's tax engine. It also covers Avalara US sales tax, VAT, and GST.

  • For native VAT and GST, leave this field unset and send the rate and the tax on each line. Set it to required when a tax provider returns the tax.
  • The request fails with 422 when the result is DualEntry's own VAT or GST, when the calculation cannot finish, or when a required address is still missing.
  • When the record has a customer, DualEntry reads shipping_address, then billing_address, then the address saved on the customer.
  • If you send neither address, DualEntry copies the customer's saved address to billing_address and shipping_address.
  • When the record has a vendor, DualEntry reads ship_from_address and ship_to_address, then the addresses saved on the vendor and the company.
  • DualEntry stores only the ship addresses you sent.
Available options:
required
record_status
enum<string>
default:posted
Available options:
draft,
posted,
archived
attachments
AttachmentSchemaOut · object[]
term_id
integer | null
reference_number
string
default:""

Response

OK

bill_to_address
string
required
deprecated

Deprecated: send the structured billing_address / shipping_address instead.

ship_to_address
string
required
deprecated

Deprecated: send the structured billing_address / shipping_address instead.

invoiced_status
enum<string>
required
Available options:
invoiced,
uninvoiced,
partially_invoiced
term_id
integer | null
required
term_name
string
required
internal_id
integer
required
number
integer
required
company_id
integer
required
company_name
string
required
company_currency
string
required
customer_id
integer
required
customer_name
string
required
currency_iso_4217_code
enum<string>
required
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYU,
UZS,
VES,
VND,
VUV,
WST,
XAF,
XAG,
XAU,
XCD,
XDR,
XOF,
XPD,
XPF,
XPT,
YER,
ZAR,
ZMW,
ZWL
exchange_rate
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,16}0*$
amount
string
required

Total amount of ordered items

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
invoiced_total
string
required

Total quantity of items that were already invoiced

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
due_total
string
required

Total quantity of items yet to be invoiced

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
memo
string
required
date
string<date>
required
record_status
enum<string>
required
Available options:
draft,
posted,
archived
reference_number
string
required
created_at
string<date-time>
required

Date and time the record was created

updated_at
string<date-time>
required

Date and time the record was last updated

billing_address
AddressSchemaOut · object | null
shipping_address
AddressSchemaOut · object | null
custom_fields
CustomFieldValuePairOutputSchema · object[]
attachments
PublicAttachmentSchemaOut · object[]
created_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

updated_by
AuditActorSchemaOut · object | null

Schema for audit actor information.

approval_status
string | null
next_approvers
ApproverDictSchema · object[] | null
rejected_by
RejectedBySchema · object | null

Schema for rejector information including rejection reason.

code
string | null
items
PublicSalesOrderItemOut · object[]
recurring_record_number
integer | null
has_more_lines
boolean
default:false
lines_count
integer
default:0