Companies

Update company

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.eyJzdWIiOiIxMzMiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NDI0NjQ5MDgsImV4cCI6MTc0NTA1NjkwOCwianRpIjoiMTU5Y2FkZjEtMGE2YS00NTA0LTg3N2QtNDM4MGZlNjJiZjk2In0.gY_dUO74AL2Dk-7nLrtMa8PseuoA1oIkr1kng0DbDas
Host: example.org
Cookie: 

Body

{
  "company": {
    "name": "Keeling-Rempel",
    "address": "9523 Krajcik Summit, Lake Marylynntown, MT YH4W 2LX",
    "license_number": "58802074630",
    "invoice_email": "aldo@dickens.example",
    "vat_number": "63616147614",
    "billing_phone_number": "+4407189018841",
    "billing_full_name": "Cedric Krajcik Esq.",
    "billing_address": "86708 Bashirian Shores, New Danyelleville, WV R9W 1BN",
    "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/"c90fc302eb1958307f28c0266f9ac2e7"
cache-control: max-age=0, private, must-revalidate
x-request-id: 6fd0ba77-edfc-46d3-85e1-76228321ada1
x-runtime: 0.014028
content-length: 414

Body

{
  "company": {
    "id": 32,
    "address": "9523 Krajcik Summit, Lake Marylynntown, MT YH4W 2LX",
    "billing_address": "86708 Bashirian Shores, New Danyelleville, WV R9W 1BN",
    "billing_full_name": "Cedric Krajcik Esq.",
    "billing_phone_number": "+4407189018841",
    "commission": "5.0",
    "due_days": 20,
    "invoice_email": "aldo@dickens.example",
    "license_number": "58802074630",
    "name": "Keeling-Rempel",
    "state": "verified",
    "vat_number": "63616147614"
  }
}