Daily closes
End-of-day close records.
The object#
| Field | Type | Description |
|---|---|---|
| idread-only | integer | NolaPro id. |
| inventorylocationid | integer | Inventorylocationid. Id only. |
| inventorylocation | string(20) | The locationcode of the referenced inventorylocations, instead of the id. Send this or inventorylocationid, not both unless they agree. |
| closedate | string | Business date the daily close covers. |
| actualcashmoney | string(4dp) | Stored as decimal(19,4). |
| currencybreakdown | text | Currencybreakdown. Stored as text, no practical length limit. |
| currency | string(10) | Currency the close totals are stated in. |
| actualchecksmoney | string(4dp) | Stored as decimal(19,4). |
| cashdrawerfloatmoney | string(4dp) | Stored as decimal(19,4). |
| depositeamountmoney | string(4dp) | Stored as decimal(19,4). |
| actualccmoney | string(4dp) | Stored as decimal(19,4). |
| overshortmoney | string(4dp) | Stored as decimal(19,4). |
| entrydate | string | When the record was created. |
| cancel | boolean | Cancelled. NolaPro cancels rather than deletes, so a cancelled row is still readable. |
| gl_cashmoney | string(4dp) | Stored as decimal(19,4). |
| gl_ccmoney | string(4dp) | Stored as decimal(19,4). |
| gl_checksmoney | string(4dp) | Stored as decimal(19,4). |
| sys_cashmoney | string(4dp) | Stored as decimal(19,4). |
| sys_ccmoney | string(4dp) | Stored as decimal(19,4). |
| sys_checksmoney | string(4dp) | Stored as decimal(19,4). |
| externalid | string(100) | Your own key. Scoped to your company. |
Endpoints#
Create many.
Requires scope payments:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| inventorylocationidrequired | integer | The drawer being closed. You must be allowed to use the location. |
| closedaterequired | string | Business date the close covers. One close per location, date and currency. |
| currency | string(10) | Currency the totals are stated in. Defaults to the company currency. |
| actualcashmoney | string(4dp) | Cash counted in the drawer, float included. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualchecksmoney | string(4dp) | Cheques counted in the drawer. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualccmoney | string(4dp) | Card settlements counted for the day. What was actually in the drawer, as a decimal string. Not a JSON number. |
| cashdrawerfloatmoney | string(4dp) | The float left in the drawer, which is not banked. What was actually in the drawer, as a decimal string. Not a JSON number. |
| depositeamountmoney | string(4dp) | What was taken to the bank. What was actually in the drawer, as a decimal string. Not a JSON number. |
| sys_cashmoney | string(4dp) | Cash What NolaPro expected from the day's takings, as a decimal string. |
| sys_checksmoney | string(4dp) | Cheques What NolaPro expected from the day's takings, as a decimal string. |
| sys_ccmoney | string(4dp) | Card settlements What NolaPro expected from the day's takings, as a decimal string. |
| gl_cashmoney | string(4dp) | Cash. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_checksmoney | string(4dp) | Cheques. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_ccmoney | string(4dp) | Card settlements. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| denominations | object | The note and coin count, as currencydenomination id to how many of them. Stored as currencybreakdown, which you cannot send directly. |
| createdeposits | boolean | Also bank the takings. Cash over the float needs nothing behind it - a till's notes and coins are not receipts. Cheques and card settlements do: name the payments they settle, or leave those amounts out. Card settlements are split into as many deposits as the location is set to keep apart. |
| checkacctid | integer | The bank account to deposit into. Defaults to the location's daily-close account, then its default account. |
| cash_invoicepaymentids | array of integer | Payments taken against invoices counted into the cash total (arinvoicepaymentdetail ids). |
| checks_invoicepaymentids | array of integer | Payments taken against invoices counted into the cheque total (arinvoicepaymentdetail ids). |
| cc_invoicepaymentids | array of integer | Payments taken against invoices counted into the card total (arinvoicepaymentdetail ids). |
| cash_orderdepositids | array of integer | Deposits taken against sales orders counted into the cash total (arorder_deposit ids). |
| checks_orderdepositids | array of integer | Deposits taken against sales orders counted into the cheque total (arorder_deposit ids). |
| cc_orderdepositids | array of integer | Deposits taken against sales orders counted into the card total (arorder_deposit ids). |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A row was malformed. Read each row's own status. |
| 409 | already_closed | A row names a location and date already closed. |
| 422 | close_refused | A row was refused. Read each row's own status. |
| 422a | unknown_value | No such location, bank account, denomination or receipt in this company. |
| 422b | read_only_field | A derived field was sent. |
| 422c | account_not_configured | The bank account has no GL account assigned. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/ardailycloses/batch' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '[ { "inventorylocationid": 104, "closedate": "2026-08-01" } ]'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses/batch'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ [ 'inventorylocationid' => 104, 'closedate' => '2026-08-01', ], ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/ardailycloses/batch", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json=[ { "inventorylocationid": 104, "closedate": "2026-08-01", }, ], ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses/batch', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify([ { inventorylocationid: 104, closedate: "2026-08-01", }, ]), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new[] { new { inventorylocationid = 104, closedate = "2026-08-01", }, }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/ardailycloses/batch") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
List daily closes.
Requires scope payments:read.
| Name | In | Type | Notes |
|---|---|---|---|
| inventorylocationid | query | string | Restrict to one inventorylocationid. |
| cancel | query | string | Defaults to false. Pass true or any. |
| externalid | query | string | Exact match on your own key. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
| Status | Code | Meaning |
|---|---|---|
| 403 | insufficient_scope | Token lacks read scope. |
curl \ 'https://acme.nolapro.com/!/api/v2/ardailycloses' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/ardailycloses", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/ardailycloses"); res.EnsureSuccessStatusCode();
Record a daily drawer close.
A daily close is not a row. It compares what was counted in the drawer against what NolaPro expected and what the ledger holds, records the difference as overshort, and - when you ask for it - banks the takings and posts the variance to the GL.
You do not send overshort or currencybreakdown. The first is derived from actualcash, cashdrawerfloat and gl_cash; the second from denominations. Sending either is refused rather than ignored, because a close whose stated variance is not its own arithmetic cannot be reconciled against anything.
With createdeposits, cash and cheques are banked together and card settlements are split by card type according to the inventory location's settings, exactly as the Daily Drawer Close screen does it - the same code runs for both.
Cash over the float banks on its own. A till that took nothing but notes and coins needs no receipt ids at all. Cheques and card settlements are different: NolaPro balances a deposit against the payments that make it up, so an amount with nothing named behind it is refused here by naming the field that fixes it, rather than failing later against the general ledger.
One close per location, date and currency. A second is a 409 rather than a silent replacement, so a retried request cannot overwrite a close whose takings are already banked.
Requires scope payments:write.
| Name | In | Type | Notes |
|---|---|---|---|
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| inventorylocationidrequired | integer | The drawer being closed. You must be allowed to use the location. |
| closedaterequired | string | Business date the close covers. One close per location, date and currency. |
| currency | string(10) | Currency the totals are stated in. Defaults to the company currency. |
| actualcashmoney | string(4dp) | Cash counted in the drawer, float included. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualchecksmoney | string(4dp) | Cheques counted in the drawer. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualccmoney | string(4dp) | Card settlements counted for the day. What was actually in the drawer, as a decimal string. Not a JSON number. |
| cashdrawerfloatmoney | string(4dp) | The float left in the drawer, which is not banked. What was actually in the drawer, as a decimal string. Not a JSON number. |
| depositeamountmoney | string(4dp) | What was taken to the bank. What was actually in the drawer, as a decimal string. Not a JSON number. |
| sys_cashmoney | string(4dp) | Cash What NolaPro expected from the day's takings, as a decimal string. |
| sys_checksmoney | string(4dp) | Cheques What NolaPro expected from the day's takings, as a decimal string. |
| sys_ccmoney | string(4dp) | Card settlements What NolaPro expected from the day's takings, as a decimal string. |
| gl_cashmoney | string(4dp) | Cash. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_checksmoney | string(4dp) | Cheques. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_ccmoney | string(4dp) | Card settlements. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| denominations | object | The note and coin count, as currencydenomination id to how many of them. Stored as currencybreakdown, which you cannot send directly. |
| createdeposits | boolean | Also bank the takings. Cash over the float needs nothing behind it - a till's notes and coins are not receipts. Cheques and card settlements do: name the payments they settle, or leave those amounts out. Card settlements are split into as many deposits as the location is set to keep apart. |
| checkacctid | integer | The bank account to deposit into. Defaults to the location's daily-close account, then its default account. |
| cash_invoicepaymentids | array of integer | Payments taken against invoices counted into the cash total (arinvoicepaymentdetail ids). |
| checks_invoicepaymentids | array of integer | Payments taken against invoices counted into the cheque total (arinvoicepaymentdetail ids). |
| cc_invoicepaymentids | array of integer | Payments taken against invoices counted into the card total (arinvoicepaymentdetail ids). |
| cash_orderdepositids | array of integer | Deposits taken against sales orders counted into the cash total (arorder_deposit ids). |
| checks_orderdepositids | array of integer | Deposits taken against sales orders counted into the cheque total (arorder_deposit ids). |
| cc_orderdepositids | array of integer | Deposits taken against sales orders counted into the card total (arorder_deposit ids). |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or malformed field. |
| 409 | already_closed | That location is already closed for that date and currency. |
| 422 | close_refused | A rule was broken. Nothing was written. |
| 422x0 | unknown_value | No such location, bank account, denomination or receipt in this company. |
| 422x1 | read_only_field | A derived field was sent. |
| 422x2 | account_not_configured | The bank account has no GL account assigned. |
curl -X POST \ 'https://acme.nolapro.com/!/api/v2/ardailycloses' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "inventorylocationid": 104, "closedate": "2026-08-01" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => json_encode([ 'inventorylocationid' => 104, 'closedate' => '2026-08-01', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.post( "https://acme.nolapro.com/!/api/v2/ardailycloses", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "inventorylocationid": 104, "closedate": "2026-08-01", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses', { method: 'POST', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ inventorylocationid: 104, closedate: "2026-08-01", }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { inventorylocationid = 104, closedate = "2026-08-01", }; var req = new HttpRequestMessage(HttpMethod.Post, "https://acme.nolapro.com/!/api/v2/ardailycloses") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Retrieve one record.
Requires scope payments:read.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| include | query | string | Comma-separated extras to embed. Only custom_fields is available: the extra fields this install has defined on the record. Off by default, and an unrecognised value is refused rather than ignored. See Conventions. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No record with that id. |
curl \ 'https://acme.nolapro.com/!/api/v2/ardailycloses/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.get( "https://acme.nolapro.com/!/api/v2/ardailycloses/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses/104', { method: 'GET', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var res = await http.GetAsync( "https://acme.nolapro.com/!/api/v2/ardailycloses/104"); res.EnsureSuccessStatusCode();
{
"inventorylocationid": 104,
"inventorylocation": "Example inventorylocation",
"closedate": "2026-08-01",
"actualcash": "125.0000",
"currencybreakdown": "Example currencybreakdown",
"currency": "Example currency"
}
Amend a daily close.
Corrects a miscount. overshort is recomputed from the amended totals, so it always states the close's own arithmetic.
Only while nothing has been banked against the close. Once a deposit exists, the counted totals are what the bank was told, and changing them here would leave the two disagreeing with no record of which is right - cancel the deposit first.
The location, date and currency identify which drawer and day this is and cannot be moved. Cancel the close and record it against the right one instead.
Requires scope payments:write.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Field | Type | Description |
|---|---|---|
| actualcashmoney | string(4dp) | Cash counted in the drawer, float included. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualchecksmoney | string(4dp) | Cheques counted in the drawer. What was actually in the drawer, as a decimal string. Not a JSON number. |
| actualccmoney | string(4dp) | Card settlements counted for the day. What was actually in the drawer, as a decimal string. Not a JSON number. |
| cashdrawerfloatmoney | string(4dp) | The float left in the drawer, which is not banked. What was actually in the drawer, as a decimal string. Not a JSON number. |
| depositeamountmoney | string(4dp) | What was taken to the bank. What was actually in the drawer, as a decimal string. Not a JSON number. |
| sys_cashmoney | string(4dp) | Cash What NolaPro expected from the day's takings, as a decimal string. |
| sys_checksmoney | string(4dp) | Cheques What NolaPro expected from the day's takings, as a decimal string. |
| sys_ccmoney | string(4dp) | Card settlements What NolaPro expected from the day's takings, as a decimal string. |
| gl_cashmoney | string(4dp) | Cash. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_checksmoney | string(4dp) | Cheques. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| gl_ccmoney | string(4dp) | Card settlements. What the ledger holds for the day, as a decimal string. gl_cash is the figure the over/short variance is measured against. |
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Missing or malformed field. |
| 404 | not_found | No such daily close in this company. |
| 409 | already_deposited | The close has already been banked. |
| 422 | read_only_field | A derived or identifying field was sent. |
curl -X PATCH \ 'https://acme.nolapro.com/!/api/v2/ardailycloses/104' \ -H 'Authorization: Bearer $NP_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-key' \ -d '{ "actualcash": "125.0000", "actualchecks": "125.0000", "actualcc": "125.0000", "cashdrawerfloat": "125.0000", "depositeamount": "125.0000", "sys_cash": "125.0000" }'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode([ 'actualcash' => '125.0000', 'actualchecks' => '125.0000', 'actualcc' => '125.0000', 'cashdrawerfloat' => '125.0000', 'depositeamount' => '125.0000', 'sys_cash' => '125.0000', ]), ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.patch( "https://acme.nolapro.com/!/api/v2/ardailycloses/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, json={ "actualcash": "125.0000", "actualchecks": "125.0000", "actualcc": "125.0000", "cashdrawerfloat": "125.0000", "depositeamount": "125.0000", "sys_cash": "125.0000", }, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses/104', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, body: JSON.stringify({ actualcash: "125.0000", actualchecks: "125.0000", actualcc: "125.0000", cashdrawerfloat: "125.0000", depositeamount: "125.0000", sys_cash: "125.0000", }), } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var body = new { actualcash = "125.0000", actualchecks = "125.0000", actualcc = "125.0000", cashdrawerfloat = "125.0000", depositeamount = "125.0000", sys_cash = "125.0000", }; var req = new HttpRequestMessage(HttpMethod.Patch, "https://acme.nolapro.com/!/api/v2/ardailycloses/104") { Content = JsonContent.Create(body), }; req.Headers.Add("Idempotency-Key", "your-unique-key"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();
Cancel a daily close.
Cancels the count sheet. Any bank deposit made from it stays, because the money reached the bank and cancelling the count does not unbank it - the response names them in bankdepositids so you know what is still on file.
Requires scope payments:cancel.
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | integer | The record id. |
| Idempotency-Key | header | string | Makes the write safely retryable. Any unique string per logical operation; a UUID is fine.
The failure this prevents is specific: the request succeeds, the response is lost to a timeout, you retry, and the customer is billed twice. With a key, the retry returns the original response - same status, same body, same id - and creates nothing.
The body is part of the key's identity. Reusing a key with a different body is a bug on your side, not a retry, and answers 409 idempotency_replay rather than silently handing back the old response. Keys are remembered for 24 hours. |
| Status | Code | Meaning |
|---|---|---|
| 404 | not_found | No such daily close in this company. |
| 409 | cannot_cancel | Already cancelled. |
curl -X DELETE \ 'https://acme.nolapro.com/!/api/v2/ardailycloses/104' \ -H 'Authorization: Bearer $NP_TOKEN'
$ch = curl_init('https://acme.nolapro.com/!/api/v2/ardailycloses/104'); curl_setopt_array($ch, [ CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('NP_TOKEN')], CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'DELETE', ]); $res = json_decode(curl_exec($ch), true);
import os, requests r = requests.delete( "https://acme.nolapro.com/!/api/v2/ardailycloses/104", headers={"Authorization": f"Bearer {os.environ['NP_TOKEN']}"}, ) r.raise_for_status()
const res = await fetch( 'https://acme.nolapro.com/!/api/v2/ardailycloses/104', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.NP_TOKEN}` }, } ); const data = await res.json();
using System.Net.Http.Json; var token = Environment.GetEnvironmentVariable("NP_TOKEN"); using var http = new HttpClient(); http.DefaultRequestHeaders.Add("Authorization", "Bearer " + token); var req = new HttpRequestMessage(HttpMethod.Delete, "https://acme.nolapro.com/!/api/v2/ardailycloses/104"); var res = await http.SendAsync(req); res.EnsureSuccessStatusCode();