cURL
curl --request PUT \
--url https://api.smartbills.io/v1/businesses/{businessId}/bills/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"currency": "<string>",
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"description": "<string>",
"category": "<string>",
"categoryId": 123,
"expenseReportId": 123,
"note": "<string>",
"tags": [
"<string>"
],
"reference": "<string>",
"date": "2023-11-07T05:31:56Z",
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": true
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"vendorId": 123,
"vendorAccountId": 123,
"merchantId": 123,
"merchant": {
"name": "<string>",
"website": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"invoiceNumber": "<string>",
"url": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"autoPaymentDate": "2023-11-07T05:31:56Z",
"paymentLinkUrl": "<string>",
"paymentStatus": "<string>",
"id": 123
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch"
payload = [
{
"currency": "<string>",
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"description": "<string>",
"category": "<string>",
"categoryId": 123,
"expenseReportId": 123,
"note": "<string>",
"tags": ["<string>"],
"reference": "<string>",
"date": "2023-11-07T05:31:56Z",
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": True
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"vendorId": 123,
"vendorAccountId": 123,
"merchantId": 123,
"merchant": {
"name": "<string>",
"website": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"invoiceNumber": "<string>",
"url": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"autoPaymentDate": "2023-11-07T05:31:56Z",
"paymentLinkUrl": "<string>",
"paymentStatus": "<string>",
"id": 123
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
currency: '<string>',
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalFees: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalShipping: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
description: '<string>',
category: '<string>',
categoryId: 123,
expenseReportId: 123,
note: '<string>',
tags: ['<string>'],
reference: '<string>',
date: '2023-11-07T05:31:56Z',
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
],
taxes: [
{
name: '<string>',
rate: 123,
totalAmount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxIdentificationNumber: '<string>',
taxIncluded: true
}
],
discounts: [
{
promoCodeId: 123,
expenseId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
percentage: 123
}
],
fees: [
{
feeId: 123,
name: '<string>',
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
type: '<string>'
}
],
vendorId: 123,
vendorAccountId: 123,
merchantId: 123,
merchant: {
name: '<string>',
website: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
}
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
invoiceNumber: '<string>',
url: '<string>',
dueDate: '2023-11-07T05:31:56Z',
periodStart: '2023-11-07T05:31:56Z',
periodEnd: '2023-11-07T05:31:56Z',
autoPaymentDate: '2023-11-07T05:31:56Z',
paymentLinkUrl: '<string>',
paymentStatus: '<string>',
id: 123
}
])
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/bills/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'currency' => '<string>',
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalFees' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalShipping' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'description' => '<string>',
'category' => '<string>',
'categoryId' => 123,
'expenseReportId' => 123,
'note' => '<string>',
'tags' => [
'<string>'
],
'reference' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
],
'taxes' => [
[
'name' => '<string>',
'rate' => 123,
'totalAmount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxIdentificationNumber' => '<string>',
'taxIncluded' => true
]
],
'discounts' => [
[
'promoCodeId' => 123,
'expenseId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'percentage' => 123
]
],
'fees' => [
[
'feeId' => 123,
'name' => '<string>',
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'type' => '<string>'
]
],
'vendorId' => 123,
'vendorAccountId' => 123,
'merchantId' => 123,
'merchant' => [
'name' => '<string>',
'website' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
]
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'invoiceNumber' => '<string>',
'url' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'periodStart' => '2023-11-07T05:31:56Z',
'periodEnd' => '2023-11-07T05:31:56Z',
'autoPaymentDate' => '2023-11-07T05:31:56Z',
'paymentLinkUrl' => '<string>',
'paymentStatus' => '<string>',
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch"
payload := strings.NewReader("[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.smartbills.io/v1/businesses/{businessId}/bills/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/bills/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]"
response = http.request(request)
puts response.read_bodyBusinessBills
Put v1businesses billsbatch
PUT
/
v1
/
businesses
/
{businessId}
/
bills
/
batch
cURL
curl --request PUT \
--url https://api.smartbills.io/v1/businesses/{businessId}/bills/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"currency": "<string>",
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"description": "<string>",
"category": "<string>",
"categoryId": 123,
"expenseReportId": 123,
"note": "<string>",
"tags": [
"<string>"
],
"reference": "<string>",
"date": "2023-11-07T05:31:56Z",
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": true,
"sku": "<string>"
}
],
"taxable": true
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": true
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"vendorId": 123,
"vendorAccountId": 123,
"merchantId": 123,
"merchant": {
"name": "<string>",
"website": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"invoiceNumber": "<string>",
"url": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"autoPaymentDate": "2023-11-07T05:31:56Z",
"paymentLinkUrl": "<string>",
"paymentStatus": "<string>",
"id": 123
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch"
payload = [
{
"currency": "<string>",
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTip": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalFees": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalShipping": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"description": "<string>",
"category": "<string>",
"categoryId": 123,
"expenseReportId": 123,
"note": "<string>",
"tags": ["<string>"],
"reference": "<string>",
"date": "2023-11-07T05:31:56Z",
"lineItems": [
{
"productId": 123,
"groupId": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"description": "<string>",
"variantId": "<string>",
"quantity": 123,
"subTotal": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDiscounts": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalDuties": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"total": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalTaxes": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxes": [
{
"taxId": 123,
"name": "<string>",
"amount": 123,
"percentage": 123,
"taxIdentificationNumber": "<string>"
}
],
"discounts": [
{
"promoCodeId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"name": "<string>"
}
],
"modifiers": [
{
"productModifierId": "<string>",
"quantity": 123,
"price": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"totalPrice": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"taxable": True,
"sku": "<string>"
}
],
"taxable": True
}
],
"taxes": [
{
"name": "<string>",
"rate": 123,
"totalAmount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"taxIdentificationNumber": "<string>",
"taxIncluded": True
}
],
"discounts": [
{
"promoCodeId": 123,
"expenseId": 123,
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"name": "<string>",
"percentage": 123
}
],
"fees": [
{
"feeId": 123,
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>",
"conversion": {
"originalAmount": 123,
"originalCurrency": "<string>",
"exchangeRate": 123,
"convertedAt": "2023-11-07T05:31:56Z"
}
},
"percentage": 123,
"type": "<string>"
}
],
"vendorId": 123,
"vendorAccountId": 123,
"merchantId": 123,
"merchant": {
"name": "<string>",
"website": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
}
},
"billingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"shippingAddress": {
"firstName": "<string>",
"lastName": "<string>",
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"company": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"googlePlaceId": "<string>",
"formattedAddress": "<string>",
"latitude": 123,
"longitude": 123,
"addressExpiresAt": "2023-11-07T05:31:56Z"
},
"invoiceNumber": "<string>",
"url": "<string>",
"dueDate": "2023-11-07T05:31:56Z",
"periodStart": "2023-11-07T05:31:56Z",
"periodEnd": "2023-11-07T05:31:56Z",
"autoPaymentDate": "2023-11-07T05:31:56Z",
"paymentLinkUrl": "<string>",
"paymentStatus": "<string>",
"id": 123
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
currency: '<string>',
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTip: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalFees: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalShipping: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
description: '<string>',
category: '<string>',
categoryId: 123,
expenseReportId: 123,
note: '<string>',
tags: ['<string>'],
reference: '<string>',
date: '2023-11-07T05:31:56Z',
lineItems: [
{
productId: 123,
groupId: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
description: '<string>',
variantId: '<string>',
quantity: 123,
subTotal: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDiscounts: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalDuties: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
total: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalTaxes: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxes: [
{
taxId: 123,
name: '<string>',
amount: 123,
percentage: 123,
taxIdentificationNumber: '<string>'
}
],
discounts: [
{
promoCodeId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
name: '<string>'
}
],
modifiers: [
{
productModifierId: '<string>',
quantity: 123,
price: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
totalPrice: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
taxable: true,
sku: '<string>'
}
],
taxable: true
}
],
taxes: [
{
name: '<string>',
rate: 123,
totalAmount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
taxIdentificationNumber: '<string>',
taxIncluded: true
}
],
discounts: [
{
promoCodeId: 123,
expenseId: 123,
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
name: '<string>',
percentage: 123
}
],
fees: [
{
feeId: 123,
name: '<string>',
amount: {
amount: 123,
currency: '<string>',
conversion: {
originalAmount: 123,
originalCurrency: '<string>',
exchangeRate: 123,
convertedAt: '2023-11-07T05:31:56Z'
}
},
percentage: 123,
type: '<string>'
}
],
vendorId: 123,
vendorAccountId: 123,
merchantId: 123,
merchant: {
name: '<string>',
website: '<string>',
email: '<string>',
phoneNumber: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
}
},
billingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
shippingAddress: {
firstName: '<string>',
lastName: '<string>',
name: '<string>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
company: '<string>',
phoneNumber: '<string>',
email: '<string>',
googlePlaceId: '<string>',
formattedAddress: '<string>',
latitude: 123,
longitude: 123,
addressExpiresAt: '2023-11-07T05:31:56Z'
},
invoiceNumber: '<string>',
url: '<string>',
dueDate: '2023-11-07T05:31:56Z',
periodStart: '2023-11-07T05:31:56Z',
periodEnd: '2023-11-07T05:31:56Z',
autoPaymentDate: '2023-11-07T05:31:56Z',
paymentLinkUrl: '<string>',
paymentStatus: '<string>',
id: 123
}
])
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/bills/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'currency' => '<string>',
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTip' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalFees' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalShipping' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'description' => '<string>',
'category' => '<string>',
'categoryId' => 123,
'expenseReportId' => 123,
'note' => '<string>',
'tags' => [
'<string>'
],
'reference' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'lineItems' => [
[
'productId' => 123,
'groupId' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'description' => '<string>',
'variantId' => '<string>',
'quantity' => 123,
'subTotal' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDiscounts' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalDuties' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'total' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalTaxes' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxes' => [
[
'taxId' => 123,
'name' => '<string>',
'amount' => 123,
'percentage' => 123,
'taxIdentificationNumber' => '<string>'
]
],
'discounts' => [
[
'promoCodeId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'name' => '<string>'
]
],
'modifiers' => [
[
'productModifierId' => '<string>',
'quantity' => 123,
'price' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'totalPrice' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'taxable' => true,
'sku' => '<string>'
]
],
'taxable' => true
]
],
'taxes' => [
[
'name' => '<string>',
'rate' => 123,
'totalAmount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'taxIdentificationNumber' => '<string>',
'taxIncluded' => true
]
],
'discounts' => [
[
'promoCodeId' => 123,
'expenseId' => 123,
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'name' => '<string>',
'percentage' => 123
]
],
'fees' => [
[
'feeId' => 123,
'name' => '<string>',
'amount' => [
'amount' => 123,
'currency' => '<string>',
'conversion' => [
'originalAmount' => 123,
'originalCurrency' => '<string>',
'exchangeRate' => 123,
'convertedAt' => '2023-11-07T05:31:56Z'
]
],
'percentage' => 123,
'type' => '<string>'
]
],
'vendorId' => 123,
'vendorAccountId' => 123,
'merchantId' => 123,
'merchant' => [
'name' => '<string>',
'website' => '<string>',
'email' => '<string>',
'phoneNumber' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
]
],
'billingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'shippingAddress' => [
'firstName' => '<string>',
'lastName' => '<string>',
'name' => '<string>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'company' => '<string>',
'phoneNumber' => '<string>',
'email' => '<string>',
'googlePlaceId' => '<string>',
'formattedAddress' => '<string>',
'latitude' => 123,
'longitude' => 123,
'addressExpiresAt' => '2023-11-07T05:31:56Z'
],
'invoiceNumber' => '<string>',
'url' => '<string>',
'dueDate' => '2023-11-07T05:31:56Z',
'periodStart' => '2023-11-07T05:31:56Z',
'periodEnd' => '2023-11-07T05:31:56Z',
'autoPaymentDate' => '2023-11-07T05:31:56Z',
'paymentLinkUrl' => '<string>',
'paymentStatus' => '<string>',
'id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smartbills.io/v1/businesses/{businessId}/bills/batch"
payload := strings.NewReader("[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.smartbills.io/v1/businesses/{businessId}/bills/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/bills/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"currency\": \"<string>\",\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTip\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalFees\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalShipping\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"categoryId\": 123,\n \"expenseReportId\": 123,\n \"note\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"reference\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"lineItems\": [\n {\n \"productId\": 123,\n \"groupId\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"variantId\": \"<string>\",\n \"quantity\": 123,\n \"subTotal\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDiscounts\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalDuties\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"total\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalTaxes\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxes\": [\n {\n \"taxId\": 123,\n \"name\": \"<string>\",\n \"amount\": 123,\n \"percentage\": 123,\n \"taxIdentificationNumber\": \"<string>\"\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"modifiers\": [\n {\n \"productModifierId\": \"<string>\",\n \"quantity\": 123,\n \"price\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"totalPrice\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"taxable\": true,\n \"sku\": \"<string>\"\n }\n ],\n \"taxable\": true\n }\n ],\n \"taxes\": [\n {\n \"name\": \"<string>\",\n \"rate\": 123,\n \"totalAmount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"taxIdentificationNumber\": \"<string>\",\n \"taxIncluded\": true\n }\n ],\n \"discounts\": [\n {\n \"promoCodeId\": 123,\n \"expenseId\": 123,\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"name\": \"<string>\",\n \"percentage\": 123\n }\n ],\n \"fees\": [\n {\n \"feeId\": 123,\n \"name\": \"<string>\",\n \"amount\": {\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"conversion\": {\n \"originalAmount\": 123,\n \"originalCurrency\": \"<string>\",\n \"exchangeRate\": 123,\n \"convertedAt\": \"2023-11-07T05:31:56Z\"\n }\n },\n \"percentage\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"vendorId\": 123,\n \"vendorAccountId\": 123,\n \"merchantId\": 123,\n \"merchant\": {\n \"name\": \"<string>\",\n \"website\": \"<string>\",\n \"email\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n },\n \"billingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"shippingAddress\": {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"company\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"email\": \"<string>\",\n \"googlePlaceId\": \"<string>\",\n \"formattedAddress\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"addressExpiresAt\": \"2023-11-07T05:31:56Z\"\n },\n \"invoiceNumber\": \"<string>\",\n \"url\": \"<string>\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"periodStart\": \"2023-11-07T05:31:56Z\",\n \"periodEnd\": \"2023-11-07T05:31:56Z\",\n \"autoPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"paymentLinkUrl\": \"<string>\",\n \"paymentStatus\": \"<string>\",\n \"id\": 123\n }\n]"
response = http.request(request)
puts response.read_bodyPath Parameters
Body
application/jsontext/jsonapplication/*+json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
DRAFT, PENDING, PARTIALLY_PAID, PAID, OVERDUE, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, VOIDED, PENDING_APPROVAL, POLICY_BLOCKED, POLICY_FLAGGED Available options:
EMPLOYEE, COMPANY Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200
OK
Was this page helpful?
⌘I