Privatisations

Return a Privatisation.

Parameters
  • idpath integerRequired

    Return a Privatisation by specific id.

  • includequery string

    Include associations (delimited with comma). Available associations: business, user.

GET/api/v1/privatisations/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Create Privatisation

Create a privatisation of a business.

Parameters
  • dataformData, objectRequired

    Form Data needed when creating a new privatisation of a business.

    • typestringRequired

      Provide Privatisation type. Current selection is only privatisations.

    • attributesformData, objectRequired

      Attributes object.

      • namestringRequired

        Privatisation name.

      • fromintegerRequired

      • tointegerRequired

      • datedateRequired

        Date should be formated as a ISO date.

      • number_of_servingsintegerRequired

      • emailstringRequired

        Privatisation email.

      • phonestring

        Privatisation phone number.

      • phone_country_codestring

        Privatisation phone number country code.

      • phone_country_prefixstring

        Privatisation phone number prefix.

      • specificationsstring

      • user_namestring

        Privatisation user name.

      • type_of_eventstring

      • chef_attendanceundefined

      • company_namestring

        Privatisation company name.

      • corporate_eventundefined

      • number_of_waitersinteger

        Number of waiters.

      • marketing_feedbackstring

        Privatisation marketing feedback.

      • consent_gdprundefined

      • menufile

    • relationshipsformData, objectRequired

      Relationships object with business object.

      • businessformData, objectRequired

        Add a Business relationships link.

        • idstringRequired

          Related Business id.

        • typestringRequired

          Business type; business.

      • userformData, object

        Add a User relationships link.

        • idstring

          Related User id.

        • typestring

          User type; user.

POST/api/v1/privatisations

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Update Privatisation

Update privatisation

Parameters
  • idpath integerRequired

    Update a Privatisation by specific id.

  • dataformData, objectRequired

    Form Data needed when updating a privatisation of a business.

    • idstringRequired

      Provide Privatisation id.

    • typestringRequired

      Provide Privatisation type. Current selection is only privatisations.

    • attributesformData, object

      Attributes object.

      • namestring

        Privatisation name.

      • datedate

        Date should be formated as a ISO date.

      • frominteger

      • tointeger

      • type_of_eventstring

      • corporate_eventundefined

      • company_namestring

        Privatisation company name.

      • number_of_servingsstring

      • specificationsstring

      • menufile

      • chef_attendanceundefined

      • number_of_waitersinteger

        Number of waiters.

      • price_centsinteger

      • currencystring

PATCH/api/v1/privatisations/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Delete Privatisation

Delete a Privatisation.

Parameters
  • idpath integerRequired

    Delete a Privatisation by specific id.

DELETE/api/v1/privatisations/{id}

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    }});
  const data = await res.json();
}

Send offer

Send email with a privatisation offer

Parameters
  • idpath integerRequired

    Send email with a privatisation offer by specific id.

PATCH/api/v1/privatisations/{id}/send

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}/send`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Accept offer

Accept a privatisation offer.

Parameters
  • dataformData, objectRequired

    Form Data needed when accepting a privatisation offer.

    • typestringRequired

      Provide Privatisation type. Current selection is only privatisations.

    • attributesformData, object

      Attributes object.

      • auth_tokenstring

        Privatisation authorization token.

PATCH/api/v1/privatisations/{id}/accept

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}/accept`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE


Reject offer

Reject a privatisation offer.

Parameters
  • dataformData, objectRequired

    Form Data needed when rejecting a privatisation offer.

    • typestringRequired

      Provide Privatisation type. Current selection is only privatisations.

    • attributesformData, object

      Attributes object.

      • auth_tokenstring

        Privatisation authorization token.

PATCH/api/v1/privatisations/{id}/reject

{
  const res = await fetch(`${BASE_URL}/api/v1/privatisations/${id}/reject`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)});

  const data = await res.json();
}

RESPONSE