Customers

Customers represent individual people that interact and spend money within your organization. Besides storing common contact information, customer objects are also responsible for tracking spending behaviors, metadata, and permissions.

The Customer Object

The associated customer which has been updated

Required attributes

  • Name
    _id
    Type
    string
    Description

    The ID of the customer

  • Name
    primaryEmail
    Type
    string email
    Description

    The primary email of the customer

Optional attributes

  • Name
    company
    Type
    string
    Description

    The company of the customer

  • Name
    name
    Type
    string
    Description

    The name of the customer collected from first name and last name

  • Name
    prename
    Type
    string
    Description

    The first name of the customer

  • Name
    lastname
    Type
    string
    Description

    The lastname of the customer

  • Name
    image
    Type
    string
    Status
    deprecated
    Description

    The image of the customer

  • Name
    number
    Type
    number float
    Description

    The number of the customer. Need to be unique and incrementing

  • Name
    phone
    Type
    string
    Description

    The phone number of the customer

  • Name
    location
    Type
    object
    Description

    The location of the customer

    Optional nested attributes (8)
    • Name
      street
      Type
      string
      Description

      The street of the location

    • Name
      line2
      Type
      string
      Description

      The additional address fields of the location

    • Name
      postal
      Type
      string
      Description

      The postal of the location

    • Name
      city
      Type
      string
      Description

      The city of the location

    • Name
      locale
      Type
      string
      Status
      deprecated
      Description

      The locale of the location

    • Name
      state
      Type
      string
      Description

      The state of the location

    • Name
      center
      Type
      array<number>
      Status
      deprecated
      Description

      The center of the location

    • Name
      country
      Type
      string
      Description

      An ISO-3166-1 Alpha 2 country code of the location

  • Name
    sellerId
    Type
    string
    Description

    The ID of the seller of the customer

  • Name
    notes
    Type
    string
    Description

    Notes of the customer

  • Name
    extraFields
    Type
    object
    Description

    Extra fields of the customer

  • Name
    tags
    Type
    array<string>
    Description

    An array of tags

  • Name
    segments
    Type
    array<string>
    Description

    An array of segment slugs, read only

  • Name
    blocked
    Type
    boolean
    Description

    Whether the customer is blocked

  • Name
    verified
    Type
    boolean
    Description

    Whether the customer is verified

  • Name
    identification
    Type
    array<LegalIdentificationDocumentResource>
    Description

    An array of identification items

    One of Only one of the following types

    Required attributes

    • Name
      type
      Type
      enum(france_siren)
      Description
    • Name
      identifier
      Type
      string
      Description
  • Name
    _account
    Type
    object
    Description

    Account specific information about the customer

    Optional nested attributes (4)
    • Name
      verificationToken
      Type
      string
      Description

      The verification token will be sent to the customer via email within a verification link, which can be used to verify the account of the customer

    • Name
      passwordResetToken
      Type
      string
      Description

      The password reset token will be sent within a password reset link via email, which can be used by the customer to reset its password

    • Name
      limitations
      Type
      object
      Description

      Account specific limitations of the customer

      Optional nested attributes (1)
      • Name
        nextVerificationMailRequest
        Type
        string date-time
        Description

        An ISO timestamp indicating when the next verification mail request can be sent

    • Name
      loginType
      Type
      enum(password, identityprovider)
      Description

      The login type of the customer.

  • Name
    meta
    Type
    object
    Description

    Custom key-value data. Metadata is useful for storing additional, structured information on an object.

  • Name
    externalId
    Type
    string
    Description

    An external identifier of the customer

  • Name
    createdAt
    Type
    string date-time
    Description

    An ISO timestamp indicating when the customer was created

  • Name
    updatedAt
    Type
    string date-time
    Description

    An ISO timestamp indicating when the customer was updated

Example

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

POST/api/customers

Create Customer

Create Customer

Payload

Required attributes

  • Name
    primaryEmail
    Type
    string email
    Description

    The primary email of the customer

Optional attributes

  • Name
    company
    Type
    string
    Description

    The company of the customer

  • Name
    name
    Type
    string
    Description

    The name of the customer collected from first name and last name

  • Name
    prename
    Type
    string
    Description

    The first name of the customer

  • Name
    lastname
    Type
    string
    Description

    The lastname of the customer

  • Name
    number
    Type
    number float
    Description

    The number of the customer. Need to be unique and incrementing

  • Name
    image
    Type
    string
    Status
    deprecated
    Description

    The image of the customer

  • Name
    location
    Type
    object
    Description

    The location of the customer

    Optional nested attributes (8)
    • Name
      street
      Type
      string
      Description

      The street of the location

    • Name
      line2
      Type
      string
      Description

      The additional address fields of the location

    • Name
      postal
      Type
      string
      Description

      The postal of the location

    • Name
      city
      Type
      string
      Description

      The city of the location

    • Name
      locale
      Type
      string
      Status
      deprecated
      Description

      The locale of the location

    • Name
      state
      Type
      string
      Description

      The state of the location

    • Name
      center
      Type
      array<number>
      Status
      deprecated
      Description

      The center of the location

    • Name
      country
      Type
      string
      Description

      An ISO-3166-1 Alpha 2 country code of the location

  • Name
    notes
    Type
    string
    Description

    Notes of the customer

  • Name
    extraFields
    Type
    object
    Description

    Extra fields of the customer

  • Name
    tags
    Type
    array<string>
    Description

    An array of tags

  • Name
    verified
    Type
    boolean
    Description

    Whether the customer is verified

  • Name
    meta
    Type
    object
    Description

    Custom key-value data. Metadata is useful for storing additional, structured information on an object.

  • Name
    externalId
    Type
    string
    Description

    An external identifier of the customer

  • Name
    identification
    Type
    array<LegalIdentificationDocumentResource>
    Description

    An array of identification items

    One of Only one of the following types

    Required attributes

    • Name
      type
      Type
      enum(france_siren)
      Description
    • Name
      identifier
      Type
      string
      Description
  • Name
    consents
    Type
    array<object>
    Description

    Optional consents provided during creation

    Required nested attributes (2)
    • Name
      consentId
      Type
      string
      Description
    • Name
      status
      Type
      enum(granted, denied)
      Description
  • Name
    phone
    Type
    string
    Description

    The phone number of the customer

  • Name
    upsert
    Type
    boolean
    Description

    If false, reject creation when the email already exists

Request

POST
/api/customers
const response = await fetch('https://vivenu.com/api/customers', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "primaryEmail": "random@mail.com",
    "company": "vivenu GmbH",
    "name": "Some fancy Name",
    "prename": "John",
    "lastname": "Robot",
    "number": 10.5,
    "image": "https://your-url/image.png",
    "location": {
      "street": "Speditionsstr",
      "line2": "string",
      "postal": "40221",
      "city": "Düsseldorf",
      "locale": "string",
      "state": "string",
      "center": [
        10.5
      ],
      "country": "DE"
    },
    "notes": "string",
    "extraFields": {},
    "tags": [
      "string"
    ],
    "verified": true,
    "meta": {},
    "externalId": "507f191e810c19729de860ea",
    "identification": [
      {
        "type": "france_siren",
        "identifier": "string"
      }
    ],
    "consents": [
      {
        "consentId": "507f191e810c19729de860ea",
        "status": "granted"
      }
    ],
    "phone": "string",
    "upsert": true
  }),
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

GET/api/customers/:id

Get Customer

Get Customer

Request

GET
/api/customers/:id
const response = await fetch('https://vivenu.com/api/customers/507f191e810c19729de860ea', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

PUT/api/customers/:id

Update Customer

Update Customer

Payload

Optional attributes

  • Name
    company
    Type
    string
    Description

    The company of the customer

  • Name
    name
    Type
    string
    Description

    The name of the customer collected from first name and last name

  • Name
    image
    Type
    string
    Status
    deprecated
    Description

    The image of the customer

  • Name
    location
    Type
    object
    Description

    The location of the customer

    Optional nested attributes (8)
    • Name
      street
      Type
      string
      Description

      The street of the location

    • Name
      line2
      Type
      string
      Description

      The additional address fields of the location

    • Name
      postal
      Type
      string
      Description

      The postal of the location

    • Name
      city
      Type
      string
      Description

      The city of the location

    • Name
      locale
      Type
      string
      Status
      deprecated
      Description

      The locale of the location

    • Name
      state
      Type
      string
      Description

      The state of the location

    • Name
      center
      Type
      array<number>
      Status
      deprecated
      Description

      The center of the location

    • Name
      country
      Type
      string
      Description

      An ISO-3166-1 Alpha 2 country code of the location

  • Name
    tags
    Type
    array<string>
    Description

    An array of tags

  • Name
    extraFields
    Type
    object
    Description

    Extra fields of the customer

  • Name
    verified
    Type
    boolean
    Description

    Whether the customer is verified

  • Name
    meta
    Type
    object
    Description

    Custom key-value data. Metadata is useful for storing additional, structured information on an object.

  • Name
    externalId
    Type
    string
    Description

    An external identifier of the customer

  • Name
    identification
    Type
    array<LegalIdentificationDocumentResource>
    Description

    An array of identification items

    One of Only one of the following types

    Required attributes

    • Name
      type
      Type
      enum(france_siren)
      Description
    • Name
      identifier
      Type
      string
      Description
  • Name
    primaryEmail
    Type
    string email
    Description

    The primary email of the customer

  • Name
    phone
    Type
    string
    Description

    The phone number of the customer

  • Name
    prename
    Type
    string
    Description

    The first name of the customer

  • Name
    lastname
    Type
    string
    Description

    The last name of the customer

  • Name
    notes
    Type
    string
    Description

    Notes for the customer

  • Name
    blocked
    Type
    boolean
    Description

    Whether the customer is blocked

  • Name
    consents
    Type
    array<object>
    Description

    Optional consents to merge into the customer

    Required nested attributes (2)
    • Name
      consentId
      Type
      string
      Description
    • Name
      status
      Type
      enum(granted, denied)
      Description

Request

PUT
/api/customers/:id
const response = await fetch('https://vivenu.com/api/customers/507f191e810c19729de860ea', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "company": "vivenu GmbH",
    "name": "Some fancy Name",
    "image": "https://your-url/image.png",
    "location": {
      "street": "Speditionsstr",
      "line2": "string",
      "postal": "40221",
      "city": "Düsseldorf",
      "locale": "string",
      "state": "string",
      "center": [
        10.5
      ],
      "country": "DE"
    },
    "tags": [
      "string"
    ],
    "extraFields": {},
    "verified": true,
    "meta": {},
    "externalId": "507f191e810c19729de860ea",
    "identification": [
      {
        "type": "france_siren",
        "identifier": "string"
      }
    ],
    "primaryEmail": "random@mail.com",
    "phone": "string",
    "prename": "John",
    "lastname": "Robot",
    "notes": "string",
    "blocked": true,
    "consents": [
      {
        "consentId": "507f191e810c19729de860ea",
        "status": "granted"
      }
    ]
  }),
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

DELETE/api/customers/:id

Delete Customer

Delete Customer

Request

DELETE
/api/customers/:id
const response = await fetch('https://vivenu.com/api/customers/507f191e810c19729de860ea', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

GET/api/customers/rich

Get all Customers

Get all Customers

Query parameters

Optional query parameters

  • Name
    name
    Type
    string
    Description

    The name of the customer collected from prename and lastname

  • Name
    email
    Type
    string
    Description

    The email of the customer

  • Name
    company
    Type
    string
    Description

    The company of the customer

  • Name
    tags
    Type
    string
    Description

    Tags of the customer

  • Name
    updatedAt
    Type
    object
    Description

    Range of dates indicating when the customer was last updated in ISO format.

    Optional nested attributes (6)
    • Name
      $gt
      Type
      string date-time
      Description

      value is greater than

    • Name
      $gte
      Type
      string date-time
      Description

      value is greater than or equal

    • Name
      $lt
      Type
      string date-time
      Description

      value is less than

    • Name
      $lte
      Type
      string date-time
      Description

      value is less than or equal

    • Name
      $eq
      Type
      string date-time
      Description

      value is equal

    • Name
      $ne
      Type
      string date-time
      Description

      value is not equal

  • Name
    top
    Type
    integer
    Description

    A limit on the number of objects to be returned. Can range between 1 and 1000.

  • Name
    skip
    Type
    integer
    Description

    The number of objects to skip for the requested result

Request

GET
/api/customers/rich
const response = await fetch('https://vivenu.com/api/customers/rich?name=Some+fancy+Name&email=value&company=vivenu+GmbH&tags=value&updatedAt=value&top=1&skip=1', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "docs": [
    {
      "_id": "507f191e810c19729de860ea",
      "primaryEmail": "random@mail.com",
      "company": "vivenu GmbH",
      "name": "Some fancy Name",
      "prename": "John",
      "lastname": "Robot",
      "image": "https://your-url/image.png",
      "number": 10.5,
      "phone": "string",
      "location": {
        "street": "Speditionsstr",
        "line2": "string",
        "postal": "40221",
        "city": "Düsseldorf",
        "locale": "string",
        "state": "string",
        "center": [
          10.5
        ],
        "country": "DE"
      },
      "sellerId": "507f191e810c19729de860ea",
      "notes": "string",
      "extraFields": {},
      "tags": [
        "string"
      ],
      "segments": [
        "string"
      ],
      "blocked": true,
      "verified": true,
      "identification": [
        {
          "type": "france_siren",
          "identifier": "string"
        }
      ],
      "_account": {
        "verificationToken": "string",
        "passwordResetToken": "string",
        "limitations": {
          "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
        },
        "loginType": "password"
      },
      "meta": {},
      "externalId": "507f191e810c19729de860ea",
      "createdAt": "2030-01-23T23:00:00.123Z",
      "updatedAt": "2030-01-23T23:00:00.123Z"
    }
  ],
  "total": 1
}

GET/api/customers/:id/balance

Get Customer Balance

Get Customer Balance

Request

GET
/api/customers/:id/balance
const response = await fetch('https://vivenu.com/api/customers/507f191e810c19729de860ea/balance', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "total": 1,
  "available": 1
}

GET/api/customers/tags

Get all Customer tags

Get all Customer tags

Request

GET
/api/customers/tags
const response = await fetch('https://vivenu.com/api/customers/tags', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

[
  "string"
]

POST/api/customers/:id/account

Create account for Customer

Create account for Customer

Payload

Optional attributes

  • Name
    suppressEmail
    Type
    boolean
    Description

    Whether the email of the customer should be suppressed in the account of the customer

Request

POST
/api/customers/:id/account
const response = await fetch('https://vivenu.com/api/customers/507f191e810c19729de860ea/account', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer {token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(  {
    "suppressEmail": true
  }),
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

GET/api/customers/me

Get current customer

Get current customer

Request

GET
/api/customers/me
const response = await fetch('https://vivenu.com/api/customers/me', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "_id": "507f191e810c19729de860ea",
  "primaryEmail": "random@mail.com",
  "company": "vivenu GmbH",
  "name": "Some fancy Name",
  "prename": "John",
  "lastname": "Robot",
  "image": "https://your-url/image.png",
  "number": 10.5,
  "phone": "string",
  "location": {
    "street": "Speditionsstr",
    "line2": "string",
    "postal": "40221",
    "city": "Düsseldorf",
    "locale": "string",
    "state": "string",
    "center": [
      10.5
    ],
    "country": "DE"
  },
  "sellerId": "507f191e810c19729de860ea",
  "notes": "string",
  "extraFields": {},
  "tags": [
    "string"
  ],
  "segments": [
    "string"
  ],
  "blocked": true,
  "verified": true,
  "identification": [
    {
      "type": "france_siren",
      "identifier": "string"
    }
  ],
  "_account": {
    "verificationToken": "string",
    "passwordResetToken": "string",
    "limitations": {
      "nextVerificationMailRequest": "2030-01-23T23:00:00.123Z"
    },
    "loginType": "password"
  },
  "meta": {},
  "externalId": "507f191e810c19729de860ea",
  "createdAt": "2030-01-23T23:00:00.123Z",
  "updatedAt": "2030-01-23T23:00:00.123Z"
}

GET/api/customers/me/transactions

Get transactions of customer

Get transactions of customer

Query parameters

Optional query parameters

  • Name
    locale
    Type
    string
    Description
  • Name
    subscriptionId
    Type
    string
    Description
  • Name
    checkoutId
    Type
    string
    Description

Request

GET
/api/customers/me/transactions
const response = await fetch('https://vivenu.com/api/customers/me/transactions?locale=value&subscriptionId=507f191e810c19729de860ea&checkoutId=507f191e810c19729de860ea', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "transactions": [
    {
      "tid": "string",
      "secret": "4b5fb736-45fd-4895-b497-124a2360c7e6",
      "realPrice": 10.5,
      "status": "NEW",
      "eventId": "507f191e810c19729de860ea",
      "subscriptionId": "507f191e810c19729de860ea",
      "tickets": [
        {
          "amount": 1,
          "price": 10.5,
          "ticketTypeId": "507f191e810c19729de860ea",
          "type": "ticket",
          "_id": "507f191e810c19729de860ea",
          "name": "Some fancy Name",
          "netPrice": 10.5,
          "taxRate": 10.5,
          "triggeredBy": "string",
          "bundleInfo": {
            "bundleId": "507f191e810c19729de860ea",
            "componentId": "507f191e810c19729de860ea",
            "optionId": "507f191e810c19729de860ea"
          },
          "categoryRef": "string",
          "seatingInfo": {
            "_type": 6,
            "statusId": "507f191e810c19729de860ea",
            "_id": "507f191e810c19729de860ea",
            "categoryId": "507f191e810c19729de860ea",
            "name": "Some fancy Name",
            "seatType": "handicapped",
            "sectionName": "string",
            "groupName": "string",
            "rowName": "string",
            "seatName": "string",
            "gate": "string"
          },
          "slotInfo": {
            "slotId": "507f191e810c19729de860ea",
            "slotStartTime": "string"
          },
          "asHardTicket": true,
          "listingId": "507f191e810c19729de860ea",
          "listingItemId": "507f191e810c19729de860ea",
          "triggeredAutomations": true,
          "meta": {},
          "addOns": [
            {
              "productId": "507f191e810c19729de860ea",
              "productVariantId": "507f191e810c19729de860ea",
              "name": "Some fancy Name"
            }
          ],
          "capabilities": [
            {
              "type": "self_service_return",
              "settings": {
                "phases": [
                  {
                    "condition": {
                      "unit": "hours",
                      "offset": 1,
                      "target": "string"
                    },
                    "refundPercentage": 10.5
                  }
                ],
                "returnRelatedItems": true
              }
            }
          ],
          "taxInfo": {
            "serviceTypeId": "507f191e810c19729de860ea",
            "exceptionId": "507f191e810c19729de860ea",
            "proceedsAccountId": "507f191e810c19729de860ea",
            "proceedsAccountCode": "string",
            "taxItems": [
              {
                "rate": 10.5,
                "perUnit": 10.5,
                "total": 10.5,
                "name": "Some fancy Name",
                "taxTypeId": "507f191e810c19729de860ea",
                "netTotal": 10.5,
                "netPerUnit": 10.5,
                "taxPayableAccountId": "507f191e810c19729de860ea",
                "taxPayableAccountCode": "string"
              }
            ]
          }
        }
      ],
      "products": [
        {
          "type": "product",
          "amount": 1,
          "price": 10.5,
          "productVariantId": "507f191e810c19729de860ea",
          "_id": "507f191e810c19729de860ea",
          "name": "Some fancy Name",
          "netPrice": 10.5,
          "taxRate": 10.5,
          "triggeredBy": "string",
          "bundleInfo": {
            "bundleId": "507f191e810c19729de860ea",
            "componentId": "507f191e810c19729de860ea",
            "optionId": "507f191e810c19729de860ea"
          },
          "isFulfillable": true,
          "taxInfo": {
            "serviceTypeId": "507f191e810c19729de860ea",
            "exceptionId": "507f191e810c19729de860ea",
            "proceedsAccountId": "507f191e810c19729de860ea",
            "proceedsAccountCode": "string",
            "taxItems": [
              {
                "rate": 10.5,
                "perUnit": 10.5,
                "total": 10.5,
                "name": "Some fancy Name",
                "taxTypeId": "507f191e810c19729de860ea",
                "netTotal": 10.5,
                "netPerUnit": 10.5,
                "taxPayableAccountId": "507f191e810c19729de860ea",
                "taxPayableAccountCode": "string"
              }
            ]
          }
        }
      ],
      "currency": "EUR",
      "vouchers": [
        "string"
      ],
      "redeemedVouchers": {
        "totalRedeemedAmount": 10.5,
        "vouchers": [
          {
            "code": "string",
            "redeemedAmount": 10.5,
            "_id": "507f191e810c19729de860ea"
          }
        ]
      },
      "email": "random@mail.com",
      "company": "vivenu GmbH",
      "name": "Some fancy Name",
      "prename": "John",
      "lastname": "Robot",
      "street": "Speditionsstr",
      "line2": "string",
      "postal": "40221",
      "city": "Düsseldorf",
      "state": "string",
      "country": "DE",
      "createdAt": "2030-01-23T23:00:00.123Z",
      "paymentStatus": "AWAITING",
      "outerCharge": 10.5,
      "paymentMethod": "paypal",
      "preferredLanguage": "de",
      "extraFields": {},
      "underShop": "string",
      "paymentInfoMethod": "string",
      "coupons": [
        "string"
      ]
    }
  ],
  "events": [
    {
      "_id": "507f191e810c19729de860ea",
      "name": "Some fancy Name",
      "start": "2030-01-23T23:00:00.123Z",
      "end": "2030-01-23T23:00:00.123Z",
      "sellerId": "507f191e810c19729de860ea",
      "meta": {},
      "eventType": "SINGLE",
      "url": "https://vivenu.com",
      "slogan": "string",
      "description": "string",
      "image": "https://your-url/image.png",
      "pageStyle": "white",
      "styleOptions": {
        "headerStyle": "default",
        "hideLocationMap": false,
        "hideLocationAddress": false,
        "categoryAlignment": 0,
        "showAvailabilityIndicator": false,
        "availabilityIndicatorThresholds": [
          0.3,
          0.7
        ]
      },
      "video": {
        "youtubeID": "string"
      },
      "gallery": [
        {
          "_id": "507f191e810c19729de860ea",
          "title": "string",
          "description": "string",
          "copyright": "string",
          "index": 10.5,
          "image": "https://your-url/image.png"
        }
      ],
      "checkinInformation": {
        "_id": "507f191e810c19729de860ea",
        "checkinStarts": "2030-01-23T23:00:00.123Z"
      },
      "accentColor": "#006DCC",
      "tickets": [
        {
          "_id": "507f191e810c19729de860ea",
          "name": "Some fancy Name",
          "price": 10.5,
          "amount": 10.5,
          "active": true,
          "description": "string",
          "image": "https://your-url/image.png",
          "color": "string",
          "posActive": true,
          "categoryRef": "string",
          "ignoredForStartingPrice": true,
          "conditionalAvailability": true,
          "ticketBackground": "string",
          "rules": [
            {
              "_id": "507f191e810c19729de860ea",
              "ticketGroup": "string",
              "min": 10.5,
              "max": 10.5
            }
          ],
          "requiresPersonalization": true,
          "requiresPersonalizationMode": "ENABLED",
          "requiresExtraFields": true,
          "requiresExtraFieldsMode": "ENABLED",
          "repersonalizationAllowedMode": "ENABLED",
          "repersonalizationFee": 10.5,
          "sortingKey": 10.5,
          "enableHardTicketOption": true,
          "forceHardTicketOption": true,
          "maxAmountPerOrder": 10.5,
          "minAmountPerOrder": 10.5,
          "minAmountPerOrderRule": 10.5,
          "taxRate": 10.5,
          "styleOptions": {
            "thumbnailImage": "string",
            "showAvailable": true,
            "hiddenInSelectionArea": true
          },
          "priceCategoryId": "507f191e810c19729de860ea",
          "entryPermissions": [
            "string"
          ],
          "ignoreForMaxAmounts": true,
          "expirationSettings": {
            "enabled": true,
            "expiresAfter": {
              "unit": "hours",
              "offset": 1,
              "target": "string"
            }
          },
          "barcodePrefix": "string",
          "salesStart": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "salesEnd": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "transferSettings": {
            "mode": "ALLOWED",
            "expiresAfter": {
              "unit": "hours",
              "offset": 1,
              "target": "string"
            },
            "retransferMode": "ALLOWED",
            "allowedUntil": {
              "unit": "hours",
              "offset": 1,
              "target": "string"
            },
            "hardTicketsMode": "ALLOWED",
            "seasonTicketMode": "NO_RESTRICTION"
          },
          "scanSettings": {
            "feedback": "highlight",
            "allowedScanCount": 10.5
          },
          "deliverySettings": {
            "wallet": {
              "enabled": "ENABLED"
            },
            "pdf": {
              "enabled": "ENABLED"
            }
          },
          "meta": {},
          "revealingSettings": {
            "enabled": "ENABLED",
            "beforeEvent": {
              "unit": "hours",
              "offset": 1,
              "target": "string"
            }
          }
        }
      ],
      "ticketExtraFields": [
        {
          "_id": "507f191e810c19729de860ea",
          "required": true,
          "name": "Some fancy Name",
          "description": "string",
          "collectInCheckout": true,
          "deleted": true,
          "type": "text",
          "options": [
            "string"
          ],
          "onlyForCertainTicketTypes": true,
          "allowedTicketTypes": [
            "string"
          ],
          "printable": true,
          "conditions": [
            {
              "_id": "507f191e810c19729de860ea",
              "baseSlug": "string",
              "operator": "equals",
              "value": []
            }
          ],
          "settings": {
            "allowedMimeTypes": [
              "application/pdf"
            ]
          }
        }
      ],
      "ticketDesign": {
        "_id": "507f191e810c19729de860ea",
        "useCustomDesign": true,
        "customDesignURL": "string",
        "footerDesignURL": "string",
        "disclaimer": "string",
        "infoColor": "string",
        "showTimeRange": true,
        "hideDates": true,
        "hideTimes": true
      },
      "extraFields": [
        {
          "_id": "507f191e810c19729de860ea",
          "required": true,
          "name": "Some fancy Name",
          "description": "string",
          "collectInCheckout": true,
          "deleted": true,
          "type": "text",
          "options": [
            "string"
          ],
          "onlyForCertainTicketTypes": true,
          "allowedTicketTypes": [
            "string"
          ],
          "printable": true,
          "conditions": [
            {
              "_id": "507f191e810c19729de860ea",
              "baseSlug": "string",
              "operator": "equals",
              "value": []
            }
          ],
          "settings": {
            "allowedMimeTypes": [
              "application/pdf"
            ]
          }
        }
      ],
      "showCountdown": true,
      "showOtherEvents": true,
      "hardTicketSettings": {
        "_id": "507f191e810c19729de860ea",
        "enabled": true,
        "fulfillmentType": "self",
        "printingMethod": "preprinted",
        "hardTicketOuterCharge": 10.5,
        "hardTicketInnerCharge": 10.5,
        "hardTicketPreviewURL": "string",
        "promotionName": "string",
        "promotionText": "string",
        "requiredDays": 1
      },
      "tracking": {
        "facebookPixel": {
          "active": true,
          "pixelId": "507f191e810c19729de860ea"
        },
        "tagging": {
          "enabled": true,
          "tags": [
            "string"
          ]
        }
      },
      "seoSettings": {
        "_id": "507f191e810c19729de860ea",
        "tags": [
          "string"
        ],
        "noIndex": true,
        "title": "string",
        "description": "string"
      },
      "soldOutFallback": {
        "_id": "507f191e810c19729de860ea",
        "soldOutFallbackType": "default",
        "soldOutFallbackLink": "string"
      },
      "reservationSettings": {
        "option": "noReservations"
      },
      "customTextConfig": {
        "_id": "507f191e810c19729de860ea",
        "buyTicketsCTA": "string"
      },
      "timezone": "string",
      "ticketSettings": {
        "codeDisplay": "BARCODE",
        "cancellationStrategy": "disabled",
        "revealingSettings": {
          "enabled": "ENABLED",
          "beforeEvent": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          }
        },
        "transferSettings": {
          "mode": "ALLOWED",
          "expiresAfter": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "retransferMode": "ALLOWED",
          "allowedUntil": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "hardTicketsMode": "ALLOWED",
          "seasonTicketMode": "NO_RESTRICTION",
          "useSeasonCardTemplate": true
        },
        "upgradeSettings": {
          "enabled": "ENABLED",
          "underShopMapping": [
            {
              "type": "tag",
              "tag": "string",
              "underShopId": "507f191e810c19729de860ea"
            }
          ]
        },
        "resellSettings": {
          "enabled": "ENABLED",
          "resellerFeeFix": 10.5,
          "resellerFeeVar": 10.5,
          "buyerFeeFix": 10.5,
          "buyerFeeVar": 10.5,
          "offerCreationStart": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "offerCreationEnd": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "salesStart": {
            "unit": "hours",
            "offset": 1,
            "target": "string"
          },
          "priceMarkup": 10.5,
          "cartAutomationMode": "BLOCKED"
        },
        "barcodeSettings": {
          "issueOfflineBarcodes": "ENABLED"
        },
        "childEventMapping": [
          {
            "childEventId": "507f191e810c19729de860ea",
            "ticketTypeMapping": {},
            "valueShare": 10.5
          }
        ],
        "seasonCardValueStrategy": "childValue"
      },
      "rootId": "507f191e810c19729de860ea",
      "customSettings": {
        "_id": "507f191e810c19729de860ea",
        "hideTicketsInTransactionPage": true,
        "dontSendTicketMail": true,
        "dontSendBookingConfirmationMail": true,
        "customMailHeaderImage": "string",
        "customTransactionCompletionText": "string",
        "disableAppleWallet": true,
        "disablePdfTickets": true,
        "showStartDate": true,
        "showStartTime": true,
        "showEndDate": true,
        "showEndTime": true,
        "showTimeRangeInListing": true,
        "showTimeRangeInTicket": true,
        "customCheckoutCSS": "string",
        "useCustomCheckoutBrand": true,
        "customCheckoutBrand": "string",
        "hideLogoInCheckout": true,
        "customEventPageHTML": "string",
        "customEventPageCSS": "string",
        "customConfirmationPage": "string",
        "hideSeatmapInCheckout": true,
        "dontSendBookingConfirmationSMS": true
      },
      "upsellSettings": {
        "_id": "507f191e810c19729de860ea",
        "active": true,
        "productStream": "string",
        "headerImage": "string",
        "crossSells": {
          "eventIds": [
            "string"
          ]
        }
      },
      "category": "string",
      "subCategory": "string",
      "showTimeRangeInTicket": true,
      "showTimeRangeInListing": true,
      "showStartDate": true,
      "showStartTime": true,
      "showEndDate": true,
      "showEndTime": true,
      "accountSettings": {
        "_id": "507f191e810c19729de860ea",
        "enforceAccounts": true,
        "enforceAuthentication": "DISABLED"
      },
      "location": {
        "locationName": "Some fancy Name",
        "locationStreet": "Speditionsstr",
        "locationCity": "Düsseldorf",
        "locationPostal": "40221",
        "locationCountry": "string",
        "geoCode": {
          "_id": "507f191e810c19729de860ea",
          "lat": 10.5,
          "lng": 10.5
        }
      },
      "resell": {
        "saleActive": true,
        "offerActive": true,
        "fees": {
          "buyerFeeFix": 10.5,
          "buyerFeeVar": 10.5
        },
        "priceMarkup": 10.5
      }
    }
  ]
}

GET/api/customers/me/shops

Get undershops of customer

Get undershops of customer

Query parameters

Required query parameters

  • Name
    eventId
    Type
    string
    Description

    The event ID to get the undershops of the customer

Optional query parameters

  • Name
    locale
    Type
    string
    Description

Request

GET
/api/customers/me/shops
const response = await fetch('https://vivenu.com/api/customers/me/shops?eventId=507f191e810c19729de860ea&locale=value', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer {token}',
  },
})

const data = await response.json()

Response (200)

{
  "shops": [
    {
      "_id": "507f191e810c19729de860ea",
      "name": "Some fancy Name"
    }
  ]
}

Was this page helpful?