curl --location -g --request POST '/orgs/{{CollectionApi:OrganizationId:MerNorwayAs}}/invoices' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"invoices": [
{
"type": "NOTICE",
"invoiceNumber": "{{$number.int(min=1,max=100000)}}",
"vat": true,
"fees": true,
"originalInvoiceAmount": 1000,
"currency": "NOK",
"invoiceDate": "{{$date.now|addDays(-30)|format('\''yyyy-MM-dd'\'')}}",
"dueDate": "{{$date.now|addDays(-14)|format('\''yyyy-MM-dd'\'')}}",
"collectionNoticeDate": null,
"ocrReferenceNumber": "{{$number.int(min=10000000000,max=99999999999)}}",
"uniqueSourceInvoiceId": "{{$string.uuid}}",
"description": "Test fra apidog",
"debtors": [
{
"type": "PRIVATE",
"firstname": "{{$person.firstName}}",
"lastname": "{{$person.lastName}}",
"customerNumber": "{{$number.int(min=10000,max=99999)}}",
"identificationNumber": "11229902271",
"dateOfBirth": "2000-01-01",
"emails": [
{
"value": "{{$internet.exampleEmail}}"
}
],
"phoneNumbers": [
{
"value": "+4741453317"
}
],
"addresses": [
{
"street": "{{$location.streetAddress(locale='\''nb_NO'\'')}}",
"city": "{{$location.city(locale='\''nb_NO'\'')}}",
"zipCode": "{{$location.zipCode(locale='\''nb_NO'\'')}}",
"countryCode": "no"
}
]
}
],
"claims": [
{
"type": "PRINCIPAL",
"remainingAmount": 1000,
"description": "Hovedstol test fra apidog"
}
]
}
]
}'