Partners

Return all Partners with Partner Integration and preference status for given Business.

Parameters
  • business_uuidpath integerRequired

    Return all Partners by specific business_uuid.

  • includequery string

    Include associations (delimited with comma). Available associations: users, partner_integrations.

  • filterformData, object

    Form Data needed when filtering.

    • categoriesstring[]

      Filter by a array of categories.

    • excluded_categoriesstring[]

      Filter by a array of excluded_categories.

    • wholesaler_categoriesstring[]

      Filter by a array of wholesaler_categories.

    • country_codesstring[]

      Filter by a array of country_codes.

    • preferredundefined

      Filter by preferred.

    • activeundefined

      Filter by active.

  • searchquery string

    Name search query.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/partners

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

  const data = await res.json();
}

RESPONSE


Available

Return all active Partners with status available and coming soon.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: users, partner_integrations.

  • filterformData, object

    Form Data needed when filtering.

    • categoriesstring[]

      Filter by a array of categories.

    • statusstring[]

      Filter by a array of status.

  • searchquery string

    Name search query.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/partners/available

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

  const data = await res.json();
}

RESPONSE


Wholesalers

Return all Partners with wholesaler category.

Parameters
  • includequery string

    Include associations (delimited with comma). Available associations: users, partner_integrations.

  • pagequery integer

    Page offset to fetch.

  • per_pagequery integer

    Number of results to return per page.

GET/api/v1/partners/wholesalers

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

  const data = await res.json();
}

RESPONSE


Partner

Return a Partner.

Parameters
  • idpath integerRequired

    Delete a Partner by specific id.

  • includequery string

    Include associations (delimited with comma). Available associations: users, partner_integrations.

GET/api/v1/partners/wholesalers

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

  const data = await res.json();
}

RESPONSE


Create Partner Click Event

Creates a click event for partner.

Parameters
  • dataformData, objectRequired

    Form Data needed when creating a click event for partner.

    • typestringRequired

      Provide Delivery type. Current selection is only partner_click_events.

    • attributesformData, objectRequired

      Attributes object.

      • event_typestringRequired

        Click event types are; website or video.

    • relationshipsformData, object

      Relationships object with partner object.

      • partnerformData, object

        Add a Partner relationships link.

        • idstring

          Related Partner id.

        • typestring

          Partner type; partner.

POST/api/v1/partners/{id}/click_event

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

  const data = await res.json();
}

RESPONSE


Links User

Link the user to the partner.

Parameters
  • idpath integerRequired

    Update user link to the partner by id.

PATCH/api/v1/partners/{id}/connect

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

  const data = await res.json();
}

RESPONSE


Disconnects User

Disconnects the user from the partner.

Parameters
  • idpath integerRequired

    Disconnects user link from the partner by id.

DELETE/api/v1/partners/{id}/connect

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