Update Standard Statement
curl --request PATCH \
--url https://ap.replace-me.example.com/statement/standard/{statementId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountCode": "string",
"accountId": 0,
"chargeLineItems": [
{
"charge_amount": 0,
"charge_classification": "string",
"charge_name": "string",
"line_item_uuid": "12d1c91d-5982-4a5a-b9be-565fed3b5c66"
}
],
"city": "string",
"commodity": "CHILLEDWATER",
"currency": "string",
"dueDate": "01/01/2021",
"endDate": "01/01/2021",
"glCode": "string",
"glMapping": {},
"month": 0,
"newCharges": 0,
"pdfUrl": "string",
"property": "string",
"serviceAddress": "string",
"startDate": "01/01/2021",
"state": "string",
"status": "ERROR",
"statusMessage": "string",
"totalAmountDue": 0,
"vendor": "string",
"year": 0,
"zipCode": "string"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountCode: 'string',
accountId: 0,
chargeLineItems: [
{
charge_amount: 0,
charge_classification: 'string',
charge_name: 'string',
line_item_uuid: '12d1c91d-5982-4a5a-b9be-565fed3b5c66'
}
],
city: 'string',
commodity: 'CHILLEDWATER',
currency: 'string',
dueDate: '01/01/2021',
endDate: '01/01/2021',
glCode: 'string',
glMapping: {},
month: 0,
newCharges: 0,
pdfUrl: 'string',
property: 'string',
serviceAddress: 'string',
startDate: '01/01/2021',
state: 'string',
status: 'ERROR',
statusMessage: 'string',
totalAmountDue: 0,
vendor: 'string',
year: 0,
zipCode: 'string'
})
};
fetch('https://ap.replace-me.example.com/statement/standard/{statementId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ap.replace-me.example.com/statement/standard/{statementId}"
payload = {
"accountCode": "string",
"accountId": 0,
"chargeLineItems": [
{
"charge_amount": 0,
"charge_classification": "string",
"charge_name": "string",
"line_item_uuid": "12d1c91d-5982-4a5a-b9be-565fed3b5c66"
}
],
"city": "string",
"commodity": "CHILLEDWATER",
"currency": "string",
"dueDate": "01/01/2021",
"endDate": "01/01/2021",
"glCode": "string",
"glMapping": {},
"month": 0,
"newCharges": 0,
"pdfUrl": "string",
"property": "string",
"serviceAddress": "string",
"startDate": "01/01/2021",
"state": "string",
"status": "ERROR",
"statusMessage": "string",
"totalAmountDue": 0,
"vendor": "string",
"year": 0,
"zipCode": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Accounts Payable API - Standard Statements
Update Standard Statement
Updates a Generic statement in the system. Note that statement ID and client ID are not editable.
Request Body Structure
| Path | Type | Description |
|---|---|---|
uuid | UUID | EnergyWatch universally unique identifier |
accountId | Integer | EnergyWatch account identifier |
accountCode | String | EnergyWatch account number |
commodity | Enum | Available values : CHILLEDWATER, ELECTRIC, NATURALGAS, STEAM, WATERSEWER |
glCode | String | EnergyWatch GL mapping identifier |
chargeAmount | Number | Charge amount for statement |
status | Enum | Available values : ERROR, NEW, PROCESSED, RETRIEVED, SYSTEM_UPDATED, UPDATED |
statusMessage | String | Status message |
pdfUrl | String | EnergyWatch Control Code identifier for PDFs |
property | String | Property name for statement |
vendor | String | Supply vendor |
serviceAddress | String | Service address for property |
city | String | City name for property |
state | String | 2-letter state abbreviation |
zipCode | String | Zip code / postal code |
currency | String | Currency code |
startDate | Date (MM/dd/yyyy) | Start date for statement |
endDate | Date (MM/dd/yyyy) | End date for statement |
month | Integer | Month for statement |
year | Integer | Year for statement |
dueDate | Date (MM/dd/yyyy) | The due date |
newCharges | Number | New charges for statement |
totalAmountDue | Number | The invoice total due |
glSettings | Json Object | Open-ended GL mappings |
lines | Generic Line Item Model | The statement’s line items |
PATCH
/
statement
/
standard
/
{statementId}
Update Standard Statement
curl --request PATCH \
--url https://ap.replace-me.example.com/statement/standard/{statementId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountCode": "string",
"accountId": 0,
"chargeLineItems": [
{
"charge_amount": 0,
"charge_classification": "string",
"charge_name": "string",
"line_item_uuid": "12d1c91d-5982-4a5a-b9be-565fed3b5c66"
}
],
"city": "string",
"commodity": "CHILLEDWATER",
"currency": "string",
"dueDate": "01/01/2021",
"endDate": "01/01/2021",
"glCode": "string",
"glMapping": {},
"month": 0,
"newCharges": 0,
"pdfUrl": "string",
"property": "string",
"serviceAddress": "string",
"startDate": "01/01/2021",
"state": "string",
"status": "ERROR",
"statusMessage": "string",
"totalAmountDue": 0,
"vendor": "string",
"year": 0,
"zipCode": "string"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accountCode: 'string',
accountId: 0,
chargeLineItems: [
{
charge_amount: 0,
charge_classification: 'string',
charge_name: 'string',
line_item_uuid: '12d1c91d-5982-4a5a-b9be-565fed3b5c66'
}
],
city: 'string',
commodity: 'CHILLEDWATER',
currency: 'string',
dueDate: '01/01/2021',
endDate: '01/01/2021',
glCode: 'string',
glMapping: {},
month: 0,
newCharges: 0,
pdfUrl: 'string',
property: 'string',
serviceAddress: 'string',
startDate: '01/01/2021',
state: 'string',
status: 'ERROR',
statusMessage: 'string',
totalAmountDue: 0,
vendor: 'string',
year: 0,
zipCode: 'string'
})
};
fetch('https://ap.replace-me.example.com/statement/standard/{statementId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://ap.replace-me.example.com/statement/standard/{statementId}"
payload = {
"accountCode": "string",
"accountId": 0,
"chargeLineItems": [
{
"charge_amount": 0,
"charge_classification": "string",
"charge_name": "string",
"line_item_uuid": "12d1c91d-5982-4a5a-b9be-565fed3b5c66"
}
],
"city": "string",
"commodity": "CHILLEDWATER",
"currency": "string",
"dueDate": "01/01/2021",
"endDate": "01/01/2021",
"glCode": "string",
"glMapping": {},
"month": 0,
"newCharges": 0,
"pdfUrl": "string",
"property": "string",
"serviceAddress": "string",
"startDate": "01/01/2021",
"state": "string",
"status": "ERROR",
"statusMessage": "string",
"totalAmountDue": 0,
"vendor": "string",
"year": 0,
"zipCode": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Authorizations
Token returned by POST /authenticate. Expires after 60 minutes of inactivity.
Path Parameters
EnergyWatch statement identifier.
Body
application/json
Show child attributes
Show child attributes
Response
Successful response

