Searching...

Matching results

    Order

    An order represents resources purchased through AirVantage such as SIMs or Bundles.

    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
    acceptedTs Date when the order was accepted. true timestamp
    account The account the order was passed for. true object
    accountUid The account unique identifier the order was passed for. true uid
    createdBy The unique identifier of the User who created the order. true uid
    createdByUser The user who created the order. true object
    createdTs Date when the order was created. true timestamp
    deliveryContact The Contact unique identifier the order will be delivered to. false uid
    description A description or comment about the order. false string
    effectiveOrderTs Date when the order is effective. false timestamp
    expectedShippingTs Date when the order is expected to be shipped. true boolean
    externalId Any id to link order to an external application other than AirVantage. true string
    orderId Short unique order identifier. true string
    postalAddress The delivery contact's postal address at the time of the order. true string
    productReference Product Reference used for the Order. true object
    productReferenceUid Product Reference unique identifier used for the Order. true uid
    provisioned Either the ordered resources have been provisioned in your AirVantage account
    Possible values are YES, NO or PARTIALLY.
    true string
    quantity Number of ordered resources. false integer
    rejectedTs Date when the order was rejected. true timestamp
    rejectionMessage A message in case the order has been rejected. true string
    shippedTs Date when the order was shipped. true timestamp
    status The status of the order
    Status values may be PENDING, ACCEPTED_STOCK, ACCEPTED_FOUNDER, ACCEPTED_RESTOCKING, ACCEPTED_BLOCKED, SCHEDULED, REJECTED, SHIPPED, ACKNOWLEDGED, CANCELED
    true string
    trackingNumber The tracking number or link to track the order once shipped.
    This field can have these kind of format:
    myTrackingNumber
    http://myTrackingUrl.com
    myTrackingNumber|http://myTrackingUrl.com
    true string
    type The type of resources ordered.
    Can be one of the followings: SIM, SMB, R2C or BUNDLE
    true string
    uid Order's unique identifier. true uid

    This is a complete representation of an Order.

    {
        "acceptedTs": null,
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "account" : {
            "uid" : "0e43ac9fb95d404fa56ce58667f05472",
            "name" : "My Account Name"
        },
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "createdByUser": {
            "uid" : "b270191e44fb460a84c2be03626eaa05",
            "name" : "Paul Durand",
        },
        "effectiveOrderTs": 144682500000,
        "createdTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "description": "My first SIM Order",
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "quantity": 100,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": null,
        "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
        "productReference" : {
            "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
            "name": "My SIMProductReference",
        },
        "status": "PENDING",
        "trackingNumber": null,
        "uid": "31343d00-8c44-11e5-aaf8-7792bd6f1830"
    }

    /accounts/ui/api/v1/orders

    Creates a new order.

    Request

    POST https://na.airvantage.net/accounts/ui/api/v1/orders
    Content-Type: application/json
    ...
    
    {
        "deliveryContact" : "2c92c0f8516cc19e0151874a1e48200d",
        "description" : "My first Order",
        "externalId" : "ORDER_EXT_ID",
        "quantity" : 100,
        "productReferenceUid" : "8019b1ee4a8e57408fb3ca38ac0ccf4a"
    }
    

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "acceptedTs": null,
        "account": {
            "uid": "0e43ac9fb95d404fa56ce58667f05472",
            "name" "My account"
        },
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "effectiveOrderTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "description": "My first SIM Order",
        "expectedShippingTs": null,
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "productReference": {
            "uid": "8019b1ee4a8e57408fb3ca38ac0ccf4a",
            "name": "My SIMProductReference"
        },
        "productReferenceUid": "8019b1ee4a8e57408fb3ca38ac0ccf4a",
        "provisioned": "NO",
        "quantity": 100,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": null,
        "status": "PENDING",
        "trackingNumber": null,
        "type": "SIM",
        "uid": "31343d008c4411e5aaf87792bd6f1830"
    }
    Name Description Use Default Type
    company Set the context where the order will be passed. optional caller's company uid
    Name Description
    order.missing.{field} Raised when a field is missing for order creation.
    order.account.unknown Raised when company context is unknown
    order.account.not.billed Raised when company context is not a billed account.
    product.reference.unknown Raised when product reference is unknown.
    product.reference.not.available Raised when product reference is not available for context company.
    unknown.contact Raised when delivery contact is unknown.
    HTTP Method POST
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write

    /accounts/ui/api/v1/orders

    Updates a pending or or scheduled order.

    Request

    PUT https://na.airvantage.net/accounts/ui/api/v1/orders
    Content-Type: application/json
    ...
    
    {
        "deliveryContact" : "2c92c0f8516cc19e0151874a1e48200d",
        "description" : "My first Order",
        "externalId" : "ORDER_EXT_ID",
        "quantity" : 100
    }
    

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    ...
    {
        "acceptedTs": null,
        "account": {
            "uid": "0e43ac9fb95d404fa56ce58667f05472",
            "name" "My account"
        },
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "effectiveOrderTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "description": "My first SIM Order",
        "expectedShippingTs": null,
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "productReference": {
            "uid": "8019b1ee4a8e57408fb3ca38ac0ccf4a",
            "name": "My SIMProductReference"
        },
        "productReferenceUid": "8019b1ee4a8e57408fb3ca38ac0ccf4a",
        "provisioned": "NO",
        "quantity": 100,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": null,
        "status": "PENDING",
        "trackingNumber": null,
        "type": "SIM",
        "uid": "31343d008c4411e5aaf87792bd6f1830"
    }
    Name Description Use Default Type
    deliveryContact Delivery Address identifier optional uid
    description Description optional String
    effectiveOrderTs Order handling date, not an expected delivery date optional timestamp
    externalId Any id to link order to an external application other than AirVantage. optional String
    quantity Number of ordered resources. optional Number
    Name Description
    order.account.unknown Raised when company context is unknown
    order.account.not.billed Raised when company context is not a billed account.
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write

    /accounts/ui/api/v1/orders

    Returns a paginated list of orders

    Request

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

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "items": [
            {
                "acceptedTs": null,
                "account": {
                    "uid": "0e43ac9fb95d404fa56ce58667f05472",
                    "name": " My account"
                },
                "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
                "createdBy": "b270191e44fb460a84c2be03626eaa05",
                "effectiveOrderTs": 1446824967838,
                "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
                "description": "My second SIM Order",
                "expectedShippingTs": null,
                "externalId": "ORDER_EXT_ID_2",
                "orderId": "SO-48170B50",
                "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
                "productReference" : {
                    "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
                    "name": "My ProductReference"
                },
                "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
                "provisioned": "NO",
                "quantity": 50,
                "rejectedTs": null,
                "rejectionMessage": null,
                "shippedTs": null,
                "status": "PENDING",
                "trackingNumber": null,
                "type": "SIM",
                "uid": "48170b50-8c45-11e5-aaf8-7792bd6f1830"
            },
            {
                "acceptedTs": null,
                "account": {"uid": "0e43ac9fb95d404fa56ce58667f05472", "name": " My account"},
                "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
                "createdBy": "b270191e44fb460a84c2be03626eaa05",
                "effectiveOrderTs": 1446824967838,
                "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
                "description": "My first SIM Order",
                "expectedShippingTs": null,
                "externalId": "ORDER_EXT_ID",
                "orderId": "SO-31343D00",
                "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
                "productReference" : {
                    "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
                    "name": "My ProductReference"
                },
                "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
                "provisioned": "NO",
                "quantity": 100,
                "rejectedTs": null,
                "rejectionMessage": null,
                "shippedTs": null,
                "status": "PENDING",
                "trackingNumber": null,
                "type": "SIM",
                "uid": "31343d00-8c44-11e5-aaf8-7792bd6f1830"
            }
        ],
        "size": 2,
        "count": 2,
        "offset": 0
    }
    Name Description Use Default Type Operand
    company Set the context company. optional caller's company uid =
    orderId Returns all orders whose orderId contains the given string. optional null string like
    externalId Returns all orders whose externalId contains the given string. optional null string like
    productReferenceUid Returns all orders whose productReferenceUid is the given one. optional null uid =
    quantity Returns all orders whose quantity is the given value. optional null integer =
    deliveryContact Returns all orders whose deliveryContact is the given one. optional null uid =
    status Returns all orders whose status is in the given list. optional null string list in
    createdBy Returns all orders created by the given user. optional null uid =
    trackingNumber Returns all offers whose trackingNumber contains the given string. optional null string like
    type Returns all orders 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/orders/{uid}

    Returns detailed information about the specified order

    Request

    GET https://na.airvantage.net/accounts/ui/api/v1/orders/31343d008c4411e5aaf87792bd6f1830

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "acceptedTs": null,
        "account" : {
            "uid" : "0e43ac9fb95d404fa56ce58667f05472",
            "name" : "My Account Name"
        },
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "createdByUser": {
            "uid" : "b270191e44fb460a84c2be03626eaa05",
            "name" : "Paul Durand",
        },
        "createdTs": 1446824967838,
        "effectiveOrderTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "description": "My first SIM Order",
        "expectedShippingTs": null,
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "productReference" : {
            "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
            "name": "My SIMProductReference"
        },
        "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
        "provisioned": "NO",
        "quantity": 100,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": null,
        "status": "PENDING",
        "trackingNumber": null,
        "type": "SIM",
        "uid": "31343d00-8c44-11e5-aaf8-7792bd6f1830",
    }
    Name Description
    unknown.order Raised when no order matches the uid.
    HTTP Method GET
    Requires Authentication Yes
    Rate Limited Yes
    Headers None
    Permissions accounts.ordering.read

    /accounts/ui/api/v1/orders/{uid}/cancel

    Cancel an existing order when in PENDING status.

    Request

    PUT https://na.airvantage.net/accounts/ui/api/v1/orders/31343d008c4411e5aaf87792bd6f1830/cancel

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "acceptedTs": null,
        "account" : {
            "uid" : "0e43ac9fb95d404fa56ce58667f05472",
            "name" : "My Account Name"
        },
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "createdTs": 1446824967838,
        "effectiveOrderTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "description": "My first SIM Order",
        "expectedShippingTs": null,
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "productReference" : {
            "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
            "name": "My SIMProductReference"
        },
        "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
        "provisioned": "NO",
        "quantity": 100,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": null,
        "status": "CANCELED",
        "trackingNumber": null,
        "type": "SIM",
        "uid": "31343d00-8c44-11e5-aaf8-7792bd6f1830",
    }
    Name Description Use Default Type
    company Set the context where is the order. optional caller's company uid
    Name Description
    unknown.order Raised when order is unknown.
    order.invalid.status Raised when order status is not PENDING
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write

    /accounts/ui/api/v1/orders/{uid}/acknowledge

    Acknowledge an existing order when in SHIPPED status.

    Request

    PUT https://na.airvantage.net/accounts/ui/api/v1/orders/31343d008c4411e5aaf87792bd6f1830/acknowledge

    Response
    200 OK

    HTTP/1.1 200 OK
    Content-Type: application/json
    {
        "acceptedTs": 1446824977838,
        "account" : {
            "uid" : "0e43ac9fb95d404fa56ce58667f05472",
            "name" : "My Account Name"
        },
        "accountUid": "0e43ac9fb95d404fa56ce58667f05472",
        "createdBy": "b270191e44fb460a84c2be03626eaa05",
        "createdTs": 1446824967838,
        "effectiveOrderTs": 1446824967838,
        "deliveryContact": "2c92c0f8516cc19e0151874a1e48200d",
        "description": "My first SIM Order",
        "expectedShippingTs": 1446824987000,
        "externalId": "ORDER_EXT_ID",
        "orderId": "SO-31343D00",
        "postalAddress": "John Smith\n350 5th Avenue\n103rd Floor\n10118\nNew York\nNew York\nUnited States",
        "productReference" : {
            "uid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
            "name": "My SIMProductReference"
        },
        "productReferenceUid": "02ff02ff-02ff-c01e-c01e-c01ec01ec01e",
        "provisioned": "NO",
        "quantity": 2,
        "rejectedTs": null,
        "rejectionMessage": null,
        "shippedTs": 1446824987838,
        "status": "ACKNOWLEDGED",
        "trackingNumber": "myTrackingUrl",
        "type": "SIM",
        "uid": "31343d00-8c44-11e5-aaf8-7792bd6f1830",
    }
    Name Description Use Default Type
    company Set the context where is the order. optional caller's company uid
    Name Description
    unknown.order Raised when order is unknown.
    order.invalid.status Raised when order status is not SHIPPED
    HTTP Method PUT
    Requires Authentication Yes
    Rate Limited Yes
    Headers Content-type: application/json
    Permissions accounts.ordering.write
    TOP