Compartir a través de


Manage orders - Create a new cart

Crea un carro nuevo.

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

Parámetros de identificador URI

Nombre En Requerido Tipo Description
customer_id
path True

string

El identificador del cliente.

version
path True

string

Encabezado de la solicitud

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

Nombre Requerido Tipo Description
Authorization True

string

Token de portador de autorización

ms-correlationid

string

Se usa para realizar el seguimiento de solicitudes internamente. Si no se proporciona un valor ms-correlationid, el servidor generará uno nuevo para cada solicitud.

ms-cv

string

Se usa para realizar el seguimiento de solicitudes internamente. Si no se proporciona un ms-cv, el servidor generará uno nuevo para cada solicitud.

ms-requestid

string

Se usa para la idempotencia de las solicitudes. Si no se proporciona un ms-requestid, el servidor generará uno nuevo para cada solicitud.

Cuerpo de la solicitud

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

Nombre Tipo Description
attributes

Microsoft.Partner.Core.Collections.ResourceAttributes

creationTimestamp

string

expirationTimestamp

string

id

string

lastModifiedTimestamp

string

lastModifiedUser

string

lineItems

Microsoft.Partner.Services.Carts.V1.Models.CartLineItem[]

links

Microsoft.Partner.Core.Collections.ResourceLinks

status

string

Respuestas

Nombre Tipo Description
201 Created

Microsoft.Partner.Services.Carts.V1.Models.Cart

La solicitud fue correcta. El cuerpo de la respuesta contiene la información del carro.

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

400 Bad Request

Faltaba o faltaba una entrada no válida. El cuerpo de la respuesta proporcionará los detalles del error.

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

401 Unauthorized

La solicitud no se ha autenticado. El cliente debe autenticarse primero con el servicio de API de asociado.

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

403 Forbidden

La solicitud se autenticó pero se rechazó, ya que el autor de la llamada no tiene los derechos para invocarla.

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

404 Not Found

El recurso no se encuentra o no está disponible con los parámetros de entrada especificados.

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

500 Internal Server Error

El servicio de API del asociado o una de sus dependencias no pudo cumplir la solicitud. Los autores de llamadas pueden reintentar esto.

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

Definiciones

Nombre Description
Microsoft.Partner.Core.Collections.Link
Microsoft.Partner.Core.Collections.ResourceAttributes
Microsoft.Partner.Core.Collections.ResourceLinks
Microsoft.Partner.Services.Carts.V1.Models.Cart
Microsoft.Partner.Services.Carts.V1.Models.CartError
Microsoft.Partner.Services.Carts.V1.Models.CartLineItem
Microsoft.Partner.Services.Carts.V1.Models.PurchaseCommitment
Microsoft.Partner.Services.Carts.V1.Models.RenewsTo
System.Collections.Generic.KeyValuePair[Microsoft.Partner.Services.Carts.V1.Models.ParticipantType,System.String]
System.Collections.Generic.KeyValuePair[System.String,System.String]
Nombre Tipo Description
body

string

headers

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

method

string

uri

string

Microsoft.Partner.Core.Collections.ResourceAttributes

Nombre Tipo Description
etag

string

objectType

string

Nombre Tipo Description
next

Microsoft.Partner.Core.Collections.Link

previous

Microsoft.Partner.Core.Collections.Link

self

Microsoft.Partner.Core.Collections.Link

Microsoft.Partner.Services.Carts.V1.Models.Cart

Nombre Tipo Description
attributes

Microsoft.Partner.Core.Collections.ResourceAttributes

creationTimestamp

string

expirationTimestamp

string

id

string

lastModifiedTimestamp

string

lastModifiedUser

string

lineItems

Microsoft.Partner.Services.Carts.V1.Models.CartLineItem[]

links

Microsoft.Partner.Core.Collections.ResourceLinks

status

string

Microsoft.Partner.Services.Carts.V1.Models.CartError

Nombre Tipo Description
errorCode enum:
  • 0
  • 10000
  • 10002
  • 10003
  • 10004
  • 10006
  • 10007
  • 10008
  • 10009
  • 10010
  • 10011
  • 10012
  • 400013
  • 400019
  • 400028
  • 400041
  • 400042
  • 400075
  • 400076
  • 900312
  • 900314
  • 900315
  • 900317
errorDescription

string

Microsoft.Partner.Services.Carts.V1.Models.CartLineItem

Nombre Tipo Description
addonItems

Microsoft.Partner.Services.Carts.V1.Models.CartLineItem[]

attestationAccepted

boolean

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

string

currencyCode

string

customTermEndDate

string

error

Microsoft.Partner.Services.Carts.V1.Models.CartError

friendlyName

string

id

integer

orderGroup

string

participants

System.Collections.Generic.KeyValuePair[Microsoft.Partner.Services.Carts.V1.Models.ParticipantType,System.String][]

promotionId

string

provisioningContext

object

purchaseCommitment

Microsoft.Partner.Services.Carts.V1.Models.PurchaseCommitment

quantity

integer

renewsTo

Microsoft.Partner.Services.Carts.V1.Models.RenewsTo

termDuration

string

Microsoft.Partner.Services.Carts.V1.Models.PurchaseCommitment

Nombre Tipo Description
amount

number

currency

string

grain

string

Microsoft.Partner.Services.Carts.V1.Models.RenewsTo

Nombre Tipo Description
termDuration

string

System.Collections.Generic.KeyValuePair[Microsoft.Partner.Services.Carts.V1.Models.ParticipantType,System.String]

Nombre Tipo Description
key enum:
  • consumption_reseller
  • transaction_reseller
  • unknown
value

string

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

Nombre Tipo Description
key

string

value

string