Skip to content
EntitlerDocs

POST/v1/customers/{external_id}/purchase-transfers

Transfer a purchase to a customer

Moves an App Store purchase from the customer who owns it to customer, with a reason, records the transfer in both customers' transfer history and follows both customers' plans. Transferring a purchase to the customer who owns it changes nothing. Needs customers:write.

curl -X POST 'https://api.entitler.co/v1/customers/ada/purchase-transfers' \
  -H "Authorization: Bearer $ENTITLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purchase":{"appStore":{"connectionId":"connectionId","originalTransactionId":"originalTransactionId"}},"reason":"reason","target":{"environmentId":"environmentId","projectId":"projectId","teamId":"teamId"}}'

Credentials

Send any one of these:

  • Bearer token

Path parameters

NameTypeDescription
external_idrequiredstringThe customer's external ID, or me for the customer a customer token or identity token names.

Request body

object

  • purchasePurchaseRef-Input
    • appStoreAppStorePurchaseRef-Input
      • connectionIdstring
      • originalTransactionIdstring
  • reasonstring
  • targetProductTarget
    • environmentIdstring
    • projectIdstring
    • teamIdstring

Responses

200The TransferPurchaseResponse message.

TransferPurchaseResponse

  • outcomePurchaseTransferOutcomerequired

    One of PURCHASE_TRANSFER_OUTCOME_UNSPECIFIED, PURCHASE_TRANSFER_OUTCOME_TRANSFERRED, PURCHASE_TRANSFER_OUTCOME_UNCHANGED.

  • transferPurchaseTransfer
    • actorcommon.Actor
      • idstringrequired
      • typecommon.ActorTyperequired

        One of ACTOR_TYPE_UNSPECIFIED, ACTOR_TYPE_USER, ACTOR_TYPE_KEY, ACTOR_TYPE_SYSTEM.

    • atintegerrequired

      at least 0; at most 18446744073709552000

    • fromExternalIdstringrequired
    • idstringrequired
    • kindPurchaseTransferKindrequired

      One of PURCHASE_TRANSFER_KIND_UNSPECIFIED, PURCHASE_TRANSFER_KIND_RESTORE, PURCHASE_TRANSFER_KIND_SUPPORT.

    • purchasePurchaseRef
      • appStoreAppStorePurchaseRef
        • connectionIdstringrequired
        • originalTransactionIdstringrequired
    • reasonstring
    • toExternalIdstringrequired

ErrorA refusal, with the HTTP status of its gRPC code.

Error

  • errorobjectrequired
    • codestringrequired
    • parametersobjectrequired

      Each value: string

    • reasonstringor nullrequired