Поделиться через


Manage orders - Create a new order

Создает новый заказ.

POST https://api.partnercenter.microsoft.com/v{version}/customers/{customer_id}/orders

Параметры URI

Имя В Обязательно Тип Описание
customer_id
path True

string

Идентификатор клиента.

version
path True

string

Заголовок запроса

Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"

Имя Обязательно Тип Описание
Authorization True

string

Токен носителя авторизации

ms-correlationid

string

Используется для внутреннего отслеживания запросов. Если ms-correlationid не указан, сервер создает новый для каждого запроса.

ms-cv

string

Используется для внутреннего отслеживания запросов. Если ms-cv не указан, сервер создает новый для каждого запроса.

ms-requestid

string

Используется для идемпотентности запросов. Если ms-requestid не указан, сервер создает новый для каждого запроса.

Текст запроса

Media Types: "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"

Имя Тип Описание
alternateId

string

attributes

Microsoft.Partner.Core.Collections.ResourceAttributes

billingCycle enum:
  • unknown
  • monthly
  • annual
  • none
  • one_time
  • triennial
client

Microsoft.Partner.Services.Orders.V2.Models.ClientContext

creationDate

string

currencyCode

string

currencySymbol

string

id

string

lineItems

Microsoft.Partner.Services.Orders.V2.Models.OrderLineItem[]

links

Microsoft.Partner.Services.Orders.V2.Models.OrderLinks

referenceCustomerId

string

status enum:
  • unknown
  • completed
  • pending
  • pending_po_upload
  • po_upload_complete
  • cancelled
  • partial_success
  • po_review_rejected
  • suspended
  • pending_review
  • error
totalPrice

number

transactionType

string

Ответы

Имя Тип Описание
201 Created

Microsoft.Partner.Services.Orders.V2.Models.Order

Запрос выполнен успешно. Текст ответа содержит новый созданный порядок.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

400 Bad Request

Входные данные отсутствуют или недопустимы. Текст ответа предоставит сведения об ошибке.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

401 Unauthorized

Запрос не прошел проверку подлинности. Сначала клиент должен пройти проверку подлинности в службе API партнера.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

403 Forbidden

Запрос прошел проверку подлинности, но ему было отказано, так как вызывающий объект не имеет прав на его вызов.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

404 Not Found

Ресурс не найден или недоступен с заданными входными параметрами.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

500 Internal Server Error

Службе API партнера или одной из ее зависимостей не удалось выполнить запрос. Вызывающие могут повторить эту попытку.

Media Types: "application/json", "text/json", "application/xml", "text/xml"

Определения

Имя Описание
Microsoft.Partner.Core.Collections.Link
Microsoft.Partner.Core.Collections.ResourceAttributes
Microsoft.Partner.Services.Orders.V2.Models.ClientContext
Microsoft.Partner.Services.Orders.V2.Models.Order
Microsoft.Partner.Services.Orders.V2.Models.OrderLineItem
Microsoft.Partner.Services.Orders.V2.Models.OrderLineItemLinks
Microsoft.Partner.Services.Orders.V2.Models.OrderLinks
Microsoft.Partner.Services.Orders.V2.Models.Pricing
Microsoft.Partner.Services.Orders.V2.Models.PurchaseCommitment
Microsoft.Partner.Services.Orders.V2.Models.RenewsTo
System.Collections.Generic.KeyValuePair[System.String,System.String]
Имя Тип Описание
body

string

headers

System.Collections.Generic.KeyValuePair[System.String,System.String][]

method

string

uri

string

Microsoft.Partner.Core.Collections.ResourceAttributes

Имя Тип Описание
etag

string

objectType

string

Microsoft.Partner.Services.Orders.V2.Models.ClientContext

Имя Тип Описание
deviceFamily

string

marketplaceCountry

string

name

string

Microsoft.Partner.Services.Orders.V2.Models.Order

Имя Тип Описание
alternateId

string

attributes

Microsoft.Partner.Core.Collections.ResourceAttributes

billingCycle enum:
  • annual
  • monthly
  • none
  • one_time
  • triennial
  • unknown
client

Microsoft.Partner.Services.Orders.V2.Models.ClientContext

creationDate

string

currencyCode

string

currencySymbol

string

id

string

lineItems

Microsoft.Partner.Services.Orders.V2.Models.OrderLineItem[]

links

Microsoft.Partner.Services.Orders.V2.Models.OrderLinks

referenceCustomerId

string

status enum:
  • cancelled
  • completed
  • error
  • partial_success
  • pending
  • pending_po_upload
  • pending_review
  • po_review_rejected
  • po_upload_complete
  • suspended
  • unknown
totalPrice

number

transactionType

string

Microsoft.Partner.Services.Orders.V2.Models.OrderLineItem

Имя Тип Описание
attestationAccepted

boolean

customTermEndDate

string

friendlyName

string

lineItemNumber

integer

links

Microsoft.Partner.Services.Orders.V2.Models.OrderLineItemLinks

offerId

string

parentSubscriptionId

string

partnerIdOnRecord

string

pricing

Microsoft.Partner.Services.Orders.V2.Models.Pricing

promotionId

string

provisioningContext

object

purchaseCommitment

Microsoft.Partner.Services.Orders.V2.Models.PurchaseCommitment

quantity

integer

renewsTo

Microsoft.Partner.Services.Orders.V2.Models.RenewsTo

subscriptionId

string

termDuration

string

transactionType

string

Имя Тип Описание
activationLinks

Microsoft.Partner.Core.Collections.Link

availability

Microsoft.Partner.Core.Collections.Link

product

Microsoft.Partner.Core.Collections.Link

provisioningStatus

Microsoft.Partner.Core.Collections.Link

sku

Microsoft.Partner.Core.Collections.Link

subscription

Microsoft.Partner.Core.Collections.Link

Имя Тип Описание
patchOperation

Microsoft.Partner.Core.Collections.Link

provisioningStatus

Microsoft.Partner.Core.Collections.Link

self

Microsoft.Partner.Core.Collections.Link

Microsoft.Partner.Services.Orders.V2.Models.Pricing

Имя Тип Описание
discountedPrice

number

extendedPrice

number

listPrice

number

price

number

proratedPrice

number

Microsoft.Partner.Services.Orders.V2.Models.PurchaseCommitment

Имя Тип Описание
amount

number

currency

string

grain

string

Microsoft.Partner.Services.Orders.V2.Models.RenewsTo

Имя Тип Описание
termDuration

string

System.Collections.Generic.KeyValuePair[System.String,System.String]

Имя Тип Описание
key

string

value

string