Create Invoice Settings
POST
/organizations/{org_slug}/invoice-settings
const url = 'https://api.mengi.cloud/organizations/example/invoice-settings';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"company_name":"example","contact_email":"hello@example.com","address_line1":"example","address_line2":"example","city":"example","postal_code":"example","country_code":"example","vat_number":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mengi.cloud/organizations/example/invoice-settings \ --header 'Content-Type: application/json' \ --data '{ "company_name": "example", "contact_email": "hello@example.com", "address_line1": "example", "address_line2": "example", "city": "example", "postal_code": "example", "country_code": "example", "vat_number": "example" }'Create invoice settings for an organization.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” org_slug
required
Org Slug
string
Request Body required
Section titled “Request Body required ” Media type application/json
InvoiceSettingsCreate
Schema for creating invoice settings.
object
contact_email
required
Contact Email
Email address for invoices
string format: email
address_line1
required
Address Line1
Street address
string
city
required
City
City
string
postal_code
required
Postal Code
Postal/ZIP code
string
country_code
required
Country Code
ISO 3166-1 alpha-2 country code
string
Example generated
{ "company_name": "example", "contact_email": "hello@example.com", "address_line1": "example", "address_line2": "example", "city": "example", "postal_code": "example", "country_code": "example", "vat_number": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
InvoiceSettingsResponse
Schema for invoice settings response.
object
id
required
Id
string format: uuid
organization_id
required
Organization Id
string format: uuid
contact_email
required
Contact Email
string
address_line1
required
Address Line1
string
city
required
City
string
postal_code
required
Postal Code
string
country_code
required
Country Code
string
vat_number_verified
required
Vat Number Verified
boolean
vat_treatment
required
VATTreatment
VAT treatment type for API responses.
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Example
{ "vat_treatment": "domestic"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}