Searching...

Matching results

    Contact

    A contact is an individual user and can be a billing or delivery contact.
    A billing contact is the contact invoices will be addressed to.
    Both billing contact and delivery contacts can be used as deliveryContact for an Order.
    Only delivery contacts can be created / edited or deleted.

    Read only fields are computed by AirVantage and can only be seen on response fragments sent by details or edit requests.

    Field Description Read Only Type
    id Contact's unique identifier. true uid
    firstName The contact's first name. false string
    lastName The contact's last name. false string
    address1 The first line of the contact's postal address. false string
    address2 The second line of the contact's postal address. false string
    postalCode The postal code for the contact's postal address. false string
    city The city of the contact's postal address. false string
    state The state of the contact's postal address. false string
    country The country of the contact's postal address. false string
    workEmail The work email of the contact. false string
    workPhone The work phone of the contact. false string
    type The type of the contact. Can be one of billTo or delivery true string

    This is a complete representation of a Contact.

    {
        "id": "2c92c0f8516659d3015167fa9f393639",
        "address1": "350 5th Avenue",
        "address2": "103rd Floor",
        "city": "New York",
        "country": "United States",
        "firstName": "John",
        "lastName": "Doe",
        "postalCode": "10118",
        "state": "New York",
        "workEmail": "john.doe@acme.com",
        "workPhone": "(212)-555-9753",
        "type": "delivery"
    }

    /accounts/ui/api/v1/contacts

    Creates a new delivery contact.

    Request

    POST https://na.airvantage.net/accounts/ui/api/v1/contacts
    Content-Type: application/json
    ...
    
    {
        "firstName": "John",
        "lastName": "Doe",
        "address1": "350 5th Avenue",
        "address2": "103rd Floor",
        "postalCode": "10118",
        "city": "New York",
        "state": "New York",
        "country": "United States",
        "workEmail": "john.doe@acme.com",
        "workPhone": "(212)-555-3100"
    }
    

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "id": "2c92c0f8516659d3015167fa9f393639",
        "address1": "350 5th Avenue",
        "address2": "103rd Floor",
        "city": "New York",
        "country": "United States",
        "firstName": "John",
        "lastName": "Doe",
        "postalCode": "10118",
        "state": "New York",
        "workEmail": "john.doe@acme.com",
        "workPhone": "(212)-555-3100",
        "type", "delivery"
    }
    Name Description Use Default Type
    company Set the context where the contact will be created. optional caller's company uid
    Name Description
    contact.missing.{field} Raised when a field is missing for contact creation.
    account.unknown Raised when company context is unknown
    account.not.billed Raised when company context is not a billed account.
    contact.not.created Raised when an unexpected error occured while creating the contact.
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write

    /accounts/ui/api/v1/contacts

    Returns a list of contacts

    Request

    GET https://na.airvantage.net/accounts/ui/api/v1/contacts

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    [
        {
            "id": "2c92c0f8516659d3015167fa9f393639",
            "address1": "350 5th Avenue",
            "address2": "103rd Floor",
            "city": "New York",
            "country": "United States",
            "firstName": "John",
            "lastName": "Doe",
            "postalCode": "10118",
            "state": "New York",
            "workEmail": "john.smith@acme.com",
            "workPhone": "(212)-555-3130",
            "type": "billTo"
        },
        {
            "id": "2c92c0f951666bf40151682b32a8654c",
            "address1": "123 allée du lac",
            "city": "Paris",
            "country": "France",
            "firstName": "Jacques",
            "lastName": "Martin",
            "postalCode": "75000",
            "workEmail": "jacques.martin@acme.com",
            "workPhone": "0132435465",
            "type": "delivery"
        }
    ]
    Name Description Use Default Type Operand
    company Set the context company. optional caller's company uid =
    type Returns all contacts whose type is the given one. optional null string =
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accounts.ordering.read

    /accounts/ui/api/v1/contacts/{uid}

    Returns detailed information about the specified contact

    Request

    GET https://na.airvantage.net/accounts/ui/api/v1/contacts/2c92c0f8516659d3015167fa9f393639

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "id": "2c92c0f8516659d3015167fa9f393639",
        "address1": "350 5th Avenue",
        "address2": "103rd Floor",
        "city": "New York",
        "country": "United States",
        "firstName": "John",
        "lastName": "Doe",
        "postalCode": "10118",
        "state": "New York",
        "workEmail": "john.doe@acme.com",
        "workPhone": "(212)-555-3100",
        "type": "delivery"
    }
    Name Description
    account.unknown Raised when company context is unknown
    account.not.billed Raised when company context is not a billed account.
    unknown.contact Raised when no contact matches the uid.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accounts.ordering.read

    /accounts/ui/api/v1/contacts/{uid}

    Edit an existing delivery contact.

    Request

    PUT https://na.airvantage.net/accounts/ui/api/v1/contacts/2c92c0f8516659d3015167fa9f393639
    Content-Type: application/json
    ...
    {
        "workPhone": "(212)-555-9753"
    }

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "id": "2c92c0f8516659d3015167fa9f393639",
        "address1": "350 5th Avenue",
        "address2": "103rd Floor",
        "city": "New York",
        "country": "United States",
        "firstName": "John",
        "lastName": "Doe",
        "postalCode": "10118",
        "state": "New York",
        "workEmail": "john.doe@acme.com",
        "workPhone": "(212)-555-9753",
        "type": "delivery"
    }
    Name Description Use Default Type
    company Set the context where is the contact. optional caller's company uid
    Name Description
    account.unknown Raised when company context is unknown
    account.not.billed Raised when company context is not a billed account.
    unknown.contact Raised when no contact matches the uid.
    contact.empty.{field} Raised when a field is passed to be emptied while it is not allowed (i.e removing workEmail).
    not.a.delivery.contact Raised when trying to edit a billTo contact.
    contact.not.updated Raised when an unexpected error occured while editing the contact.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write

    /accounts/ui/api/v1/contacts/{uid}

    Delete an existing delivery contact.

    Request

    DELETE https://na.airvantage.net/accounts/ui/api/v1/contacts/2c92c0f8516659d3015167fa9f393639

    Response
    200 OK

    HTTP/1.1 200 OK
    Name Description Use Default Type
    company Set the context where is the contact. optional caller's company uid
    Name Description
    account.unknown Raised when company context is unknown
    account.not.billed Raised when company context is not a billed account.
    unknown.contact Raised when no contact matches the uid.
    not.a.delivery.contact Raised when trying to delete a billTo contact.
    contact.not.updated Raised when an unexpected error occured while deleting the contact.
    HTTP Method DELETE
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write
    TOP