# List hosting orders

Lists the hosting orders for the project.

Endpoint: GET /v1/projects/{projectId}/hostingOrders
Version: 1.0
Security: Basic, OAuth2.0

## Path parameters:

  - `projectId` (string, required)
    Found on your Sinch Customer Dashboard. Settings > Projects.
    Example: "d1923022-5199-4bb3-a513-c47b3a656bc5"

## Query parameters:

  - `states` (string, required)
    The hosting order states
    Enum: "HOSTING_ORDER_STATE_UNSPECIFIED", "DRAFT", "SUBMITTED", "WAITING_FOR_LOA_SIGNATURE", "IN_PROGRESS", "COMPLETED", "REJECTED"

  - `type` (string, required)
    The hosting order type
    Enum: "HOSTING_ORDER_TYPE_UNSPECIFIED", "IMPORT", "TYPE_TEXT_ENABLE"

  - `servicePlanId` (string, required)
    The hosting order servicePlanId
    Example: "324e4567-e89b-12d3-a456-426614174000"

  - `campaignId` (string, required)
    The hosting order campaignId
    Example: "123e4567-e89b-12d3-a456-426614174000"

  - `regionCode` (string)
    Region code to filter by. ISO 3166-1 alpha-2 country code of the phone number. Currently supported are US, CA
    Example: "US"

  - `orderBy` (string)
    Parameter used to order the returned hosting orders
    Enum: "createdTime", "updatedTime"

  - `pageToken` (string)
    The next page token value returned from a previous listing.
    Example: "C2VNYXJrEg4KDCsxMjAxMjI2MzUyOQ=="

  - `pageSize` (integer)
    The maximum number of items to return, server can enforce an upper limit and overwrite the value.
    Example: 20

## Response 200 fields (application/json):

  - `hostingOrders` (array)

  - `hostingOrders.projectId` (string)
    The project ID to which the hosting order is associated.
    Example: "YOUR_project_id"

  - `hostingOrders.hostingOrderId` (string)
    The unique ID of the hosting order.
    Example: "YOUR_hosting_order_id"

  - `hostingOrders.displayName` (string)
    The friendly name of the hosting order.
    Example: "MyHostingOrder"

  - `hostingOrders.regionCode` (string)
    The region code of the hosting order. Number hosting is only available for the US and Canada, so you must enter either "US" or "CA".
    Example: "US"

  - `hostingOrders.state` (string)
    The state of the hosting order.
    Enum: same as `states` (7 values)

  - `hostingOrders.type` (string)
    The hosting order type.
    Enum: same as `type` (3 values)

  - `hostingOrders.createdTime` (string)
    Timestamp when the hosting order was created

  - `hostingOrders.updatedTime` (string)
    Timestamp when the hosting order was last updated

  - `hostingOrders.scheduledOsrUpdateTime` (string)
    Timestamp when the OSR update will be done

  - `hostingOrders.servicePlanId` (string)
    The service plan to which the hosting order is associated.
    Example: "YOUR_service_plan_id"

  - `hostingOrders.campaignId` (string)
    The campaign to which the hosting order is associated.
    Example: "YOUR_campaign_id"

  - `hostingOrders.migrateToSinchTmo` (boolean)
    Displays if a number is assigned to another aggregator in T-Mobile's platform, and requires migration from previous aggregator to Sinch.

  - `hostingOrders.textEnableInfo` (object)

  - `hostingOrders.textEnableInfo.businessName` (string)
    The name of the business.
    Example: "Acme, Inc."

  - `hostingOrders.textEnableInfo.authorisedPerson` (object)
    The person authorized and responsible for the hosting order.

  - `hostingOrders.textEnableInfo.authorisedPerson.firstName` (string, required)
    The first name of the authorized person.
    Example: "John"

  - `hostingOrders.textEnableInfo.authorisedPerson.lastName` (string, required)
    The last name of the authorized person.
    Example: "Doe"

  - `hostingOrders.textEnableInfo.authorisedPerson.email` (string, required)
    The email address of the authorized person.
    Example: "john.doe@company.com"

  - `hostingOrders.textEnableInfo.address` (object)
    The address of the business.

  - `hostingOrders.textEnableInfo.address.buildingNumber` (string, required)
    The building number of the address.
    Example: "123"

  - `hostingOrders.textEnableInfo.address.street` (string, required)
    The street name of the address.
    Example: "1st"

  - `hostingOrders.textEnableInfo.address.city` (string, required)
    The city name of the address.
    Example: "New York"

  - `hostingOrders.textEnableInfo.address.state` (string, required)
    The state name of the address.
    Example: "NY"

  - `hostingOrders.textEnableInfo.address.postalCode` (string, required)
    The postal code of the address.
    Example: "00001"

  - `hostingOrders.textEnableInfo.address.country` (string, required)
    The country of the address.
    Example: "USA"

  - `hostingOrders.textEnableInfo.serviceProvider` (string)

  - `hostingOrders.textEnableInfo.currentVoiceCarrier` (string)
    The current carrier you are using for voice services for the number you want to host on Sinch.
    Example: "TMO"

  - `hostingOrders.textEnableInfo.nnid` (string)
    The Net Number ID for the number you want to host on Sinch.

  - `hostingOrders.textEnableInfo.loaType` (string)
    The type of the letter of authorization.
    Enum: "Direct", "Reseller"

  - `hostingOrders.callbackUrl` (string)
    The client's callback URL to be called upon finishing the number import.
    Example: "https://www.your-callback-server.com/callback"

  - `nextPageToken` (string)

  - `totalSize` (integer)

## Response 404 fields (application/json):

  - `code` (string)
    The HTTP response code for the error.
    Example: "404"

  - `message` (string)
    The friendly message describing the reason for the error response.
    Example: "The imported number could not be found."

  - `status` (string)
    The HTTP response status for the error.
    Example: "NOT_FOUND"


