@plentymarkets/shop-api / doMigrateGuestOrderToCustomer
Function: doMigrateGuestOrderToCustomer() ​
doMigrateGuestOrderToCustomer(
context
,params
):Promise
<Data
<Order
>>
Method doMigrateGuestOrderToCustomer - Used to migrate a guest order to the logged-in customer.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: MigrateGuestOrderToCustomerParams
orderId: number - The ID of the order to be migrated. accessKey: string - The access key of the order to be migrated. postcodes: string - The postcode of the order for validation. name: string - The lastname of the order for validation.
Returns ​
Order
Remarks ​
- Calls /rest/storefront/order/migrate-guest
- Method should be used to migrate a guest order to the logged-in customer.
Example ​
ts
const { data, error } = await useSdk().plentysystems.doMigrateGuestOrderToCustomer({
orderId: 123456,
orderAccessKey: 'ABCDEFGH',
postcode: '12345',
name: 'Doe'
});