Skip to content

Create Contract ​

Create a contract with invoice items and agreement settings. Draft description — behavior must be confirmed.

PUT /v1/Invoices/CustomAction/importcontract

Use the Test or Production base URL configured under Overview.

Headers and authentication ​

Use OAuth 2.0 Client Credentials and the Authorization header with a Bearer access token, as described under Overview.

Request body fields ​

Draft: Field descriptions are proposed from the supplied example. Mandatory fields, null handling, accepted values and validation rules are TBD. Types below reflect example JSON values; they are not a confirmed schema. The example uses date strings in YYYY-MM-DD form. All identifiers in the sample are demo values.

Field pathMandatoryDescription
contractsTBDarray
Contracts included in this import request.
contracts[].contractTBDobject
Contract details for one imported record.
contracts[].contract.creditorreferencecodeTBDstring
Creditor reference code. Use a code assigned to your integration.
contracts[].contract.customerguidTBDstring
Identifier of the customer associated with the contract.
contracts[].contract.activeTBDboolean
Indicates whether the contract is active.
contracts[].contract.contractrefnoTBDstring
Contract reference number in the sending system.
contracts[].contract.descriptionTBDstring
Description of the contract or invoice item.
contracts[].contract.noteTBDstring
Additional note for the contract.
contracts[].contract.contractdateTBDstring
Date of the contract.
contracts[].contract.startdateTBDstring
Start date of the contract.
contracts[].contract.nextinvoicedateTBDstring
Next planned invoice date.
contracts[].contract.enddateTBDstring
End date of the contract.
contracts[].contract.intervaldaysTBDinteger
Number of days used for the invoicing interval. Interaction with intervaltype is TBD.
contracts[].contract.intervaltypeTBDstring
Interval calculation type. The supplied example uses physicaldays; other accepted values are TBD.
contracts[].contract.paymentconditionTBDinteger
Payment condition value. Whether this is a code or a number of days is TBD.
contracts[].contract.invoiceitemTBDarray
Invoice items included in the contract.
contracts[].contract.invoiceitem[].permanentitemTBDinteger
Integer flag for the item. Meaning of 0 and 1 and recurrence behavior are TBD.
contracts[].contract.invoiceitem[].itemnumberTBDstring
Item reference or number.
contracts[].contract.invoiceitem[].unittypeTBDstring
Unit type for the item. The supplied example uses pcs; accepted values are TBD.
contracts[].contract.invoiceitem[].descriptionTBDstring
Description of the contract or invoice item.
contracts[].contract.invoiceitem[].amountTBDnumber
Amount for the item. Tax treatment and relationship to itemprincipal are TBD.
contracts[].contract.invoiceitem[].vatcodeTBDstring
VAT code for the item. The supplied example uses SE25; accepted codes are TBD.
contracts[].contract.invoiceitem[].remainingcountTBDinteger
Remaining count for the item. Meaning of zero and counting rules are TBD.
contracts[].contract.invoiceitem[].itemcountTBDinteger
Quantity or count for the item. Calculation rules are TBD.
contracts[].contract.invoiceitem[].itemprincipalTBDnumber
Principal amount for the item. Relationship to amount and quantity is TBD.
contracts[].contract.invoiceitem[].intervalTBDinteger
Item interval value. Unit and interaction with the contract interval are TBD.
contracts[].contract.continuousagreementTBDinteger
Integer agreement flag. Meaning of 0 and 1 is TBD.
contracts[].contract.maxnumunpaidinvoicesTBDinteger
Maximum number of unpaid invoices. Behavior when the limit is reached is TBD.
contracts[].contract.agreementTBDobject
Agreement settings for the contract.
contracts[].contract.agreement.numberofpaymentsTBDinteger
Number of payments in the agreement.
contracts[].contract.agreement.purchasableTBDboolean
Indicates whether the agreement is eligible for purchase. Eligibility rules are TBD.
contracts[].contract.agreement.currencyTBDstring
Currency code for the agreement; the supplied example uses SEK.

Response fields ​

HTTP 200 ​

A successful request returns the following fields. Mandatory remains TBD; a single example does not establish guaranteed presence or null handling.

Field pathMandatoryDescription
resultTBDstring
Operation result. The supplied successful response returns OK.
contractrefnoTBDstring
Contract reference number.
contractguidTBDstring
Identifier of the created contract.

Error responses ​

TBD: Error status codes and response fields have not been supplied.