GET
Description
Retrieves a list of terms of payments or a single term of payment.
URL structure
https://api.fortnox.se/3/termsofpayments/{Code}
Method
GET
Version
3
Response
The terms of payment register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.
<?xml version="1.0" encoding="UTF-8"?> <TermsOfPayments> <TermsOfPaymentSubset url="https://api.fortnox.se/3/termsofpayments/0"> <Code>0</Code> <Description>0 dagar</Description> </TermsOfPaymentSubset> [...] <TermsOfPaymentSubset url="https://api.fortnox.se/3/termsofpayments/PF"> <Code>PF</Code> <Description>Postförskott</Description> </TermsOfPaymentSubset> </TermsOfPayments>
<?xml version="1.0" encoding="UTF-8"?> <TermsOfPayment url="https://api.fortnox.se/3/termsofpayments/PF"> <Code>PF</Code> <Description>Postförskott</Description> </TermsOfPayment>
{ "TermsOfPayments": [ { "@url": "https://api.fortnox.se/3/termsofpayments/0", "Code": "0", "Description": "0 dagar" }, [...] { "@url": "https://api.fortnox.se/3/termsofpayments/PF", "Code": "PF", "Description": "Postförskott" } ] }
{ "TermsOfPayment": { "@url": "https://api.fortnox.se/3/termsofpayments/PF", "Code": "PF", "Description": "Postförskott" } }
POST
Description
Creates a term of payment.
URL structure
https://api.fortnox.se/3/termsofpayments/
Method
POST
Version
3
Request
The request body should contain a structure of a term of payment, either in JSON or XML.
Response
The response should contain the created term of payment in either JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <TermsOfPayment url="https://api.fortnox.se/3/termsofpayments/60"> <Code>60</Code> <Description>60 dagar</Description> </TermsOfPayment>
{ "TermsOfPayment": { "@url": "https://api.fortnox.se/3/termsofpayments/60", "Code": "60", "Description": "60 dagar" } }
PUT
Description
Updates a term of payment.
URL structure
https://api.fortnox.se/3/termsofpayments/{Code}
Method
PUT
Version
3
Request
The request body should contain a structure of a term of payment, either in JSON or XML.
Response
The response should contain the updated term of payment in either JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <TermsOfPayment url="https://api.fortnox.se/3/termsofpayments/60"> <Code>60</Code> <Description>60 arbetsdagar</Description> </TermsOfPayment>
{ "TermsOfPayment": { "@url": "https://api.fortnox.se/3/termsofpayments/60", "Code": "60", "Description": "60 arbetsdagar" } }
DELETE
Description
Removes a term of payment.
URL structure
https://api.fortnox.se/3/termsofpayments/{Code}
Method
DELETE
Version
3
Request
The request body should be empty.
Response
The response body should be empty.
Fields
Field | Description | Limits | Type | Searchable | Sortable | Required | R/W |
---|---|---|---|---|---|---|---|
Url | Direct URL to the record | – | String | – | – | – | R |
Code | The code of the term of payment | – | String | – | Yes | Yes | R/W* |
Description | The description of the term of payment | – | String | – | – | Yes | R/W |