Update company
Companies
PUT company (admin)
Endpoint
PUT /api/v1/companies/:id
Parameters
Name | Description |
---|---|
company[name] required | Company name |
company[address] required | Company address |
company[license_number] required | Company license number |
company[vat_number] required | Company vat number |
company[invoice_email] required | Company invoice email |
company[billing_phone_number] required | Company billing phone number |
company[billing_full_name] required | Company billing full name |
company[billing_address] required | Company billing address |
company[due_days] | Company due days |
company[commission] | Company commission |
Request
Route
PUT /api/v1/companies/32
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMzMiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NDg1MTY0OTYsImV4cCI6MTc1MTEwODQ5NiwianRpIjoiMDA4NmQyZDktOTc5Ni00ZmIxLWI0NjMtYzMwMjkzNzgzOWQ3In0.3iV1Yu-2HrZL3i2-ws2mHY22cdQJ1F_llgiGSGYhB8E
Host: example.org
Cookie:
Body
{
"company": {
"name": "Welch Inc",
"address": "9848 Marvin Square, Port Dena, IA TP5V 2QS",
"license_number": "57711922360",
"invoice_email": "kip_ferry@crooks.example",
"vat_number": "78388698439",
"billing_phone_number": "+4407551361738",
"billing_full_name": "Roland Bailey",
"billing_address": "2635 Spinka Station, Juanchester, WA Y5G 3BE",
"due_days": 20,
"commission": 5
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"6575ab5502e0e7bc3384e09cda982618"
cache-control: max-age=0, private, must-revalidate
x-request-id: b4382937-42fa-4084-be02-f44fec16878f
x-runtime: 0.021655
content-length: 389
Body
{
"company": {
"id": 32,
"address": "9848 Marvin Square, Port Dena, IA TP5V 2QS",
"billing_address": "2635 Spinka Station, Juanchester, WA Y5G 3BE",
"billing_full_name": "Roland Bailey",
"billing_phone_number": "+4407551361738",
"commission": "5.0",
"due_days": 20,
"invoice_email": "kip_ferry@crooks.example",
"license_number": "57711922360",
"name": "Welch Inc",
"state": "verified",
"vat_number": "78388698439"
}
}