Class: PurchaseOrdersService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:59
Extends
BaseService
Constructors
Constructor
new PurchaseOrdersService(
client):PurchaseOrdersService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:12
Parameters
client
Returns
PurchaseOrdersService
Inherited from
BaseService.constructor
Properties
client
protectedclient:TanqoryClient
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:10
Inherited from
BaseService.client
Methods
addComment()
addComment(
storeId,poId,message):Promise<APIResponse<{attachments?:object[];authorId?:string;authorName?:string;createdAt:Date;description?:string;editedAt?:Date;id:string;isComment:boolean;isEdited:boolean;isSystem:boolean;mentions?:object[];metadata?:Record<string,unknown>;purchaseOrderId?:string;storeId?:string;title:string;type:"NOTIFICATION_SENT"|"NOTIFICATION_FAILED"|"NOTIFICATION_RESENT"|"TRACKING_ADDED"|"TRACKING_UPDATED"|"NOTE_ADDED"|"COMMENT"|"ITEMS_ADDED"|"ITEMS_REMOVED"|"ITEMS_ADJUSTED"|"ITEMS_RECEIVED"|"ITEMS_ACCEPTED"|"ITEMS_REJECTED"|"PO_CREATED"|"PO_UPDATED"|"PO_ORDERED"|"PO_CANCELLED"|"PO_CLOSED"|"RECEIVING_STARTED"|"ARRIVAL_UPDATED"|"SUPPLIER_NOTIFIED"|"SUPPLIER_CONFIRMED"; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:317
Add a comment to the purchase order timeline
Parameters
storeId
string
poId
string
message
string
Returns
Promise<APIResponse<{ attachments?: object[]; authorId?: string; authorName?: string; createdAt: Date; description?: string; editedAt?: Date; id: string; isComment: boolean; isEdited: boolean; isSystem: boolean; mentions?: object[]; metadata?: Record<string, unknown>; purchaseOrderId?: string; storeId?: string; title: string; type: "NOTIFICATION_SENT" | "NOTIFICATION_FAILED" | "NOTIFICATION_RESENT" | "TRACKING_ADDED" | "TRACKING_UPDATED" | "NOTE_ADDED" | "COMMENT" | "ITEMS_ADDED" | "ITEMS_REMOVED" | "ITEMS_ADJUSTED" | "ITEMS_RECEIVED" | "ITEMS_ACCEPTED" | "ITEMS_REJECTED" | "PO_CREATED" | "PO_UPDATED" | "PO_ORDERED" | "PO_CANCELLED" | "PO_CLOSED" | "RECEIVING_STARTED" | "ARRIVAL_UPDATED" | "SUPPLIER_NOTIFIED" | "SUPPLIER_CONFIRMED"; }>>
addPurchaseOrderComment()
addPurchaseOrderComment(
storeId,poId,message):Promise<{attachments?:object[];authorId?:string;authorName?:string;createdAt:Date;description?:string;editedAt?:Date;id:string;isComment:boolean;isEdited:boolean;isSystem:boolean;mentions?:object[];metadata?:Record<string,unknown>;purchaseOrderId?:string;storeId?:string;title:string;type:"NOTIFICATION_SENT"|"NOTIFICATION_FAILED"|"NOTIFICATION_RESENT"|"TRACKING_ADDED"|"TRACKING_UPDATED"|"NOTE_ADDED"|"COMMENT"|"ITEMS_ADDED"|"ITEMS_REMOVED"|"ITEMS_ADJUSTED"|"ITEMS_RECEIVED"|"ITEMS_ACCEPTED"|"ITEMS_REJECTED"|"PO_CREATED"|"PO_UPDATED"|"PO_ORDERED"|"PO_CANCELLED"|"PO_CLOSED"|"RECEIVING_STARTED"|"ARRIVAL_UPDATED"|"SUPPLIER_NOTIFIED"|"SUPPLIER_CONFIRMED"; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:363
Parameters
storeId
string
poId
string
message
string
Returns
Promise<{ attachments?: object[]; authorId?: string; authorName?: string; createdAt: Date; description?: string; editedAt?: Date; id: string; isComment: boolean; isEdited: boolean; isSystem: boolean; mentions?: object[]; metadata?: Record<string, unknown>; purchaseOrderId?: string; storeId?: string; title: string; type: "NOTIFICATION_SENT" | "NOTIFICATION_FAILED" | "NOTIFICATION_RESENT" | "TRACKING_ADDED" | "TRACKING_UPDATED" | "NOTE_ADDED" | "COMMENT" | "ITEMS_ADDED" | "ITEMS_REMOVED" | "ITEMS_ADJUSTED" | "ITEMS_RECEIVED" | "ITEMS_ACCEPTED" | "ITEMS_REJECTED" | "PO_CREATED" | "PO_UPDATED" | "PO_ORDERED" | "PO_CANCELLED" | "PO_CLOSED" | "RECEIVING_STARTED" | "ARRIVAL_UPDATED" | "SUPPLIER_NOTIFIED" | "SUPPLIER_CONFIRMED"; }>
buildQuery()
protectedbuildQuery(options?):Record<string,any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:26
Build query parameters
Parameters
options?
Returns
Record<string, any>
Inherited from
BaseService.buildQuery
close()
close(
storeId,poId):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:214
Close a purchase order
Parameters
storeId
string
poId
string
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
closePurchaseOrder()
closePurchaseOrder(
storeId,poId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:300
Parameters
storeId
string
poId
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
create()
create(
storeId,data):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:150
Create purchase order
Parameters
storeId
string
data
carrierId?
string
currency
string
destinationId
string
estimatedArrival?
Date
items
object[]
noteToSupplier?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
referenceNumber?
string
shippingCarrier?
string
supplierId
string
tags?
string[]
trackingNumber?
string
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
createPurchaseOrder()
createPurchaseOrder(
storeId,data):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:265
Parameters
storeId
string
data
carrierId?
string
currency
string
destinationId
string
estimatedArrival?
Date
items
object[]
noteToSupplier?
string
paymentTerms?
"NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"
referenceNumber?
string
shippingCarrier?
string
supplierId
string
tags?
string[]
trackingNumber?
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
delete()
delete(
storeId,poId):Promise<{success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:179
Delete purchase order
Parameters
storeId
string
poId
string
Returns
Promise<{ success: boolean; }>
deleteComment()
deleteComment(
storeId,poId,commentId):Promise<{success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:348
Delete a comment from the purchase order timeline
Parameters
storeId
string
poId
string
commentId
string
Returns
Promise<{ success: boolean; }>
deletePurchaseOrder()
deletePurchaseOrder(
storeId,poId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:282
Parameters
storeId
string
poId
string
Returns
Promise<void>
deletePurchaseOrderComment()
deletePurchaseOrderComment(
storeId,poId,commentId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:382
Parameters
storeId
string
poId
string
commentId
string
Returns
Promise<void>
editComment()
editComment(
storeId,poId,commentId,message):Promise<APIResponse<{attachments?:object[];authorId?:string;authorName?:string;createdAt:Date;description?:string;editedAt?:Date;id:string;isComment:boolean;isEdited:boolean;isSystem:boolean;mentions?:object[];metadata?:Record<string,unknown>;purchaseOrderId?:string;storeId?:string;title:string;type:"NOTIFICATION_SENT"|"NOTIFICATION_FAILED"|"NOTIFICATION_RESENT"|"TRACKING_ADDED"|"TRACKING_UPDATED"|"NOTE_ADDED"|"COMMENT"|"ITEMS_ADDED"|"ITEMS_REMOVED"|"ITEMS_ADJUSTED"|"ITEMS_RECEIVED"|"ITEMS_ACCEPTED"|"ITEMS_REJECTED"|"PO_CREATED"|"PO_UPDATED"|"PO_ORDERED"|"PO_CANCELLED"|"PO_CLOSED"|"RECEIVING_STARTED"|"ARRIVAL_UPDATED"|"SUPPLIER_NOTIFIED"|"SUPPLIER_CONFIRMED"; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:332
Edit a comment in the purchase order timeline
Parameters
storeId
string
poId
string
commentId
string
message
string
Returns
Promise<APIResponse<{ attachments?: object[]; authorId?: string; authorName?: string; createdAt: Date; description?: string; editedAt?: Date; id: string; isComment: boolean; isEdited: boolean; isSystem: boolean; mentions?: object[]; metadata?: Record<string, unknown>; purchaseOrderId?: string; storeId?: string; title: string; type: "NOTIFICATION_SENT" | "NOTIFICATION_FAILED" | "NOTIFICATION_RESENT" | "TRACKING_ADDED" | "TRACKING_UPDATED" | "NOTE_ADDED" | "COMMENT" | "ITEMS_ADDED" | "ITEMS_REMOVED" | "ITEMS_ADJUSTED" | "ITEMS_RECEIVED" | "ITEMS_ACCEPTED" | "ITEMS_REJECTED" | "PO_CREATED" | "PO_UPDATED" | "PO_ORDERED" | "PO_CANCELLED" | "PO_CLOSED" | "RECEIVING_STARTED" | "ARRIVAL_UPDATED" | "SUPPLIER_NOTIFIED" | "SUPPLIER_CONFIRMED"; }>>
editPurchaseOrderComment()
editPurchaseOrderComment(
storeId,poId,commentId,message):Promise<{attachments?:object[];authorId?:string;authorName?:string;createdAt:Date;description?:string;editedAt?:Date;id:string;isComment:boolean;isEdited:boolean;isSystem:boolean;mentions?:object[];metadata?:Record<string,unknown>;purchaseOrderId?:string;storeId?:string;title:string;type:"NOTIFICATION_SENT"|"NOTIFICATION_FAILED"|"NOTIFICATION_RESENT"|"TRACKING_ADDED"|"TRACKING_UPDATED"|"NOTE_ADDED"|"COMMENT"|"ITEMS_ADDED"|"ITEMS_REMOVED"|"ITEMS_ADJUSTED"|"ITEMS_RECEIVED"|"ITEMS_ACCEPTED"|"ITEMS_REJECTED"|"PO_CREATED"|"PO_UPDATED"|"PO_ORDERED"|"PO_CANCELLED"|"PO_CLOSED"|"RECEIVING_STARTED"|"ARRIVAL_UPDATED"|"SUPPLIER_NOTIFIED"|"SUPPLIER_CONFIRMED"; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:372
Parameters
storeId
string
poId
string
commentId
string
message
string
Returns
Promise<{ attachments?: object[]; authorId?: string; authorName?: string; createdAt: Date; description?: string; editedAt?: Date; id: string; isComment: boolean; isEdited: boolean; isSystem: boolean; mentions?: object[]; metadata?: Record<string, unknown>; purchaseOrderId?: string; storeId?: string; title: string; type: "NOTIFICATION_SENT" | "NOTIFICATION_FAILED" | "NOTIFICATION_RESENT" | "TRACKING_ADDED" | "TRACKING_UPDATED" | "NOTE_ADDED" | "COMMENT" | "ITEMS_ADDED" | "ITEMS_REMOVED" | "ITEMS_ADJUSTED" | "ITEMS_RECEIVED" | "ITEMS_ACCEPTED" | "ITEMS_REJECTED" | "PO_CREATED" | "PO_UPDATED" | "PO_ORDERED" | "PO_CANCELLED" | "PO_CLOSED" | "RECEIVING_STARTED" | "ARRIVAL_UPDATED" | "SUPPLIER_NOTIFIED" | "SUPPLIER_CONFIRMED"; }>
generateIdempotencyKey()
protectedgenerateIdempotencyKey(prefix):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:19
Generate idempotency key
Parameters
prefix
string
Returns
string
Inherited from
BaseService.generateIdempotencyKey
getCounts()
getCounts(
storeId):Promise<APIResponse<PurchaseOrderCountsResponse>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:104
Get purchase order counts by status
Parameters
storeId
string
Returns
Promise<APIResponse<PurchaseOrderCountsResponse>>
getCountsTimeseries()
getCountsTimeseries(
storeId,params):Promise<APIResponse<{all:object[];ordered:object[];partial:object[];received:object[]; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:114
Get purchase order counts timeseries for analytics charts
Parameters
storeId
string
params
from
string
groupBy?
"day" | "week" | "month"
to
string
Returns
Promise<APIResponse<{ all: object[]; ordered: object[]; partial: object[]; received: object[]; }>>
getExportMimeType()
protectedgetExportMimeType(format):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:45
Get MIME type for export format
Parameters
format
string
Returns
string
Inherited from
BaseService.getExportMimeType
getPurchaseOrder()
getPurchaseOrder(
storeId,poId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:260
Parameters
storeId
string
poId
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
getPurchaseOrderCounts()
getPurchaseOrderCounts(
storeId):Promise<PurchaseOrderCountsResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:242
Parameters
storeId
string
Returns
Promise<PurchaseOrderCountsResponse>
getPurchaseOrderCountsTimeseries()
getPurchaseOrderCountsTimeseries(
storeId,params):Promise<{all:object[];ordered:object[];partial:object[];received:object[]; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:247
Parameters
storeId
string
params
from
string
groupBy?
"day" | "week" | "month"
to
string
Returns
Promise<{ all: object[]; ordered: object[]; partial: object[]; received: object[]; }>
list()
list(
storeId,options?):Promise<ListPurchaseOrdersResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:63
List purchase orders
Parameters
storeId
string
options?
ListPurchaseOrdersOptions
Returns
Promise<ListPurchaseOrdersResponse>
listPurchaseOrders()
listPurchaseOrders(
storeId,options?):Promise<ListPurchaseOrdersResponse>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:235
Parameters
storeId
string
options?
ListPurchaseOrdersOptions
Returns
Promise<ListPurchaseOrdersResponse>
markAsOrdered()
markAsOrdered(
storeId,poId):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:189
Mark purchase order as ordered
Parameters
storeId
string
poId
string
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
markPurchaseOrderAsOrdered()
markPurchaseOrderAsOrdered(
storeId,poId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:286
Parameters
storeId
string
poId
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
receiveItems()
receiveItems(
storeId,poId,data):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:199
Receive items for a purchase order
Parameters
storeId
string
poId
string
data
items
object[]
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
receivePurchaseOrderItems()
receivePurchaseOrderItems(
storeId,poId,data):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:291
Parameters
storeId
string
poId
string
data
items
object[]
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
reopen()
reopen(
storeId,poId):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:224
Reopen a closed purchase order
Parameters
storeId
string
poId
string
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
reopenPurchaseOrder()
reopenPurchaseOrder(
storeId,poId):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:305
Parameters
storeId
string
poId
string
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>
retrieve()
retrieve(
storeId,poId):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:140
Get purchase order by ID
Parameters
storeId
string
poId
string
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
update()
update(
storeId,poId,data):Promise<APIResponse<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:164
Update purchase order
Parameters
storeId
string
poId
string
data
Partial<UpdatePurchaseOrderInput>
Returns
Promise<APIResponse<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>>
updatePurchaseOrder()
updatePurchaseOrder(
storeId,poId,data):Promise<{costs: {adjustments:object[];shipping: {amount:number;currency:string; };subtotal: {amount:number;currency:string; };tax: {amount:number;currency:string; };total: {amount:number;currency:string; }; };createdAt:Date;currency:string;destinationId:string;destinationIsActive?:boolean;destinationName:string;expectedAt?:Date;id:string;items:object[];noteToSupplier?:string;orderedAt?:Date;paymentTerms?:"NONE"|"CASH_ON_DELIVERY"|"PAYMENT_ON_RECEIPT"|"NET_7"|"NET_15"|"NET_30"|"NET_45"|"NET_60"|"NET_90";poNumber:string;receivedAt?:Date;referenceNumber?:string;shipment?: {carrierId?:string;carrierName?:string;estimatedArrival?:Date;shippingCarrier?:string;trackingNumber?:string;trackingUrl?:string; };status:"CLOSED"|"DRAFT"|"PARTIAL"|"ORDERED"|"RECEIVED";storeId:string;supplierAddress?: {address1:string;address2?:string;city:string;company?:string;country:string;firstName?:string;lastName?:string;phone?:string;postalCode:string;province:string; };supplierId:string;supplierName:string;tags:string[];timeline:object[];updatedAt:Date; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/purchase-orders.ts:273
Parameters
storeId
string
poId
string
data
Partial<UpdatePurchaseOrderInput>
Returns
Promise<{ costs: { adjustments: object[]; shipping: { amount: number; currency: string; }; subtotal: { amount: number; currency: string; }; tax: { amount: number; currency: string; }; total: { amount: number; currency: string; }; }; createdAt: Date; currency: string; destinationId: string; destinationIsActive?: boolean; destinationName: string; expectedAt?: Date; id: string; items: object[]; noteToSupplier?: string; orderedAt?: Date; paymentTerms?: "NONE" | "CASH_ON_DELIVERY" | "PAYMENT_ON_RECEIPT" | "NET_7" | "NET_15" | "NET_30" | "NET_45" | "NET_60" | "NET_90"; poNumber: string; receivedAt?: Date; referenceNumber?: string; shipment?: { carrierId?: string; carrierName?: string; estimatedArrival?: Date; shippingCarrier?: string; trackingNumber?: string; trackingUrl?: string; }; status: "CLOSED" | "DRAFT" | "PARTIAL" | "ORDERED" | "RECEIVED"; storeId: string; supplierAddress?: { address1: string; address2?: string; city: string; company?: string; country: string; firstName?: string; lastName?: string; phone?: string; postalCode: string; province: string; }; supplierId: string; supplierName: string; tags: string[]; timeline: object[]; updatedAt: Date; }>