Documentation
¶
Index ¶
- type ChannelSpecificOrderResponse
- type CustomOrderResponse
- type FulfillResponse
- type ImportResponse
- type MappingResponse
- type Order
- type OrderCancel
- type OrderFulfill
- type OrderFulfillData
- type OrderItem
- type OrderMapping
- type OrderMappingData
- type OrderResponse
- type OrderService
- func (o *OrderService) AddInventoryForOrderedProduct(orderFulfill *OrderFulfill) ([]FulfillResponse, error)
- func (o *OrderService) CancelOrders(orderCancel *OrderCancel) error
- func (o *OrderService) CreateChannelSpecificOrder(order *Order) (*ChannelSpecificOrderResponse, error)
- func (o *OrderService) CreateCustomOrder() (*http.Response, error)
- func (o *OrderService) GetOrderByID(orderId string) (OrderResponse, error)
- func (o *OrderService) GetOrders() (*OrderResponse, error)
- func (o *OrderService) ImportOrders(filePath string) (*ImportResponse, error)
- func (o *OrderService) MapOrders(orderMapping *OrderMapping) ([]MappingResponse, error)
- func (o *OrderService) UpdateCustomerDeliveryAddress(update *ShippingAddressUpdate) (*ShippingAddressUpdateResponse, error)
- func (o *OrderService) UpdateOrder(orderUpdate *Order) (*OrderUpdateResponse, error)
- func (o *OrderService) UpdatePickupLocation(update *PickupLocationUpdate) (*PickupLocationUpdateResponse, error)
- type OrderUpdateResponse
- type PickupLocationUpdate
- type PickupLocationUpdateResponse
- type ShippingAddressUpdate
- type ShippingAddressUpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomOrderResponse ¶
type CustomOrderResponse struct {
OrderID int `json:"order_id"`
ShipmentID int `json:"shipment_id"`
Status string `json:"status"`
StatusCode int `json:"status_code"`
OnboardingCompletedNow int `json:"onboarding_completed_now"`
AWBCode *string `json:"awb_code"`
CourierCompanyID *int `json:"courier_company_id"`
CourierName *string `json:"courier_name"`
}
type FulfillResponse ¶
type FulfillResponse struct {
Data OrderFulfillData `json:"data"`
Success bool `json:"success"`
Message string `json:"message"`
}
type ImportResponse ¶
type ImportResponse struct {
ID int `json:"id"`
}
type MappingResponse ¶
type MappingResponse struct {
Data OrderMappingData `json:"data"`
StatusCode int `json:"status_code"`
Success bool `json:"success"`
Message string `json:"message"`
}
type Order ¶
type Order struct {
OrderID string `json:"order_id"`
OrderDate string `json:"order_date"`
PickupLocation string `json:"pickup_location"`
ChannelID string `json:"channel_id"`
Comment string `json:"comment"`
BillingCustomerName string `json:"billing_customer_name"`
BillingLastName string `json:"billing_last_name"`
BillingAddress string `json:"billing_address"`
BillingAddress2 string `json:"billing_address_2"`
BillingCity string `json:"billing_city"`
BillingPincode string `json:"billing_pincode"`
BillingState string `json:"billing_state"`
BillingCountry string `json:"billing_country"`
BillingEmail string `json:"billing_email"`
BillingPhone string `json:"billing_phone"`
ShippingIsBilling bool `json:"shipping_is_billing"`
ShippingCustomerName string `json:"shipping_customer_name"`
ShippingLastName string `json:"shipping_last_name"`
ShippingAddress string `json:"shipping_address"`
ShippingAddress2 string `json:"shipping_address_2"`
ShippingCity string `json:"shipping_city"`
ShippingPincode string `json:"shipping_pincode"`
ShippingCountry string `json:"shipping_country"`
ShippingState string `json:"shipping_state"`
ShippingEmail string `json:"shipping_email"`
ShippingPhone string `json:"shipping_phone"`
OrderItems []OrderItem `json:"order_items"`
PaymentMethod string `json:"payment_method"`
ShippingCharges float64 `json:"shipping_charges"`
GiftwrapCharges float64 `json:"giftwrap_charges"`
TransactionCharges float64 `json:"transaction_charges"`
TotalDiscount float64 `json:"total_discount"`
SubTotal float64 `json:"sub_total"`
Length float64 `json:"length"`
Breadth float64 `json:"breadth"`
Height float64 `json:"height"`
Weight float64 `json:"weight"`
}
type OrderCancel ¶
type OrderCancel struct {
Ids []int `json:"ids"`
}
type OrderFulfill ¶
type OrderFulfill struct {
Data []OrderFulfillData `json:"data"`
}
type OrderFulfillData ¶
type OrderMapping ¶
type OrderMapping struct {
Data []OrderMappingData `json:"data"`
}
type OrderMappingData ¶
type OrderResponse ¶
type OrderResponse struct {
Data json.RawMessage `json:"data"`
}
type OrderService ¶
func (*OrderService) AddInventoryForOrderedProduct ¶
func (o *OrderService) AddInventoryForOrderedProduct(orderFulfill *OrderFulfill) ([]FulfillResponse, error)
Add Inventory for Ordered Product
func (*OrderService) CancelOrders ¶
func (o *OrderService) CancelOrders(orderCancel *OrderCancel) error
Cancel an Order Use this API to cancel a created order. Multiple order_ids can be passed together as an array to cancel them simultaneously.
func (*OrderService) CreateChannelSpecificOrder ¶
func (o *OrderService) CreateChannelSpecificOrder(order *Order) (*ChannelSpecificOrderResponse, error)
Create Channel Specific Order This API can be used to create a custom order, the same as the Custom order API, except that you have to specify and select a custom channel to create the order.
func (*OrderService) CreateCustomOrder ¶
func (o *OrderService) CreateCustomOrder() (*http.Response, error)
Create Custom Order Use this API to create a quick custom order. Quick orders are the ones where we do not store the product details in the master catalogue.
func (*OrderService) GetOrderByID ¶
func (o *OrderService) GetOrderByID(orderId string) (OrderResponse, error)
Get Specific Order Details Get the order and shipment details of a particular order through this API by passing the Shiprocket order_id in the endpoint URL itself — type in your order_id in place of {id}.
func (*OrderService) GetOrders ¶
func (o *OrderService) GetOrders() (*OrderResponse, error)
Get Order response This API call will display a list of all created and available orders in your Shiprocket account. The product and shipment details are displayed as sub-arrays within each order detail.
func (*OrderService) ImportOrders ¶
func (o *OrderService) ImportOrders(filePath string) (*ImportResponse, error)
Import Orders in Bulk Use this API to import orders in bulk to your Shiprocket account from an existing '.csv' file. The imported orders are automatically added to your panel.
func (*OrderService) MapOrders ¶
func (o *OrderService) MapOrders(orderMapping *OrderMapping) ([]MappingResponse, error)
Map Unmapped Products This API maps your unmapped inventory products.
func (*OrderService) UpdateCustomerDeliveryAddress ¶
func (o *OrderService) UpdateCustomerDeliveryAddress(update *ShippingAddressUpdate) (*ShippingAddressUpdateResponse, error)
Update Customer Delivery Address You can update the customer's name and delivery address through this API by passing the Shiprocket order id and the necessary customer details.
func (*OrderService) UpdateOrder ¶
func (o *OrderService) UpdateOrder(orderUpdate *Order) (*OrderUpdateResponse, error)
Update Order Use this API to update your orders. You have to pass all the required params at the minimum to create a quick custom order. You can add additional parameters as per your preference. You can update only the order_items details before assigning the AWB (before Ready to Ship status). You can only update these key-value pairs i.e increase/decrease the quantity, update tax/discount, add/remove product items.
func (*OrderService) UpdatePickupLocation ¶
func (o *OrderService) UpdatePickupLocation(update *PickupLocationUpdate) (*PickupLocationUpdateResponse, error)
Change/Update Pickup Location of Created Orders Using this API, you can modify the pickup location of an already created order. Multiple order ids can be passed to update their pickup location together.
type OrderUpdateResponse ¶
type OrderUpdateResponse struct {
Success bool `json:"success"`
PartiallyUpdate bool `json:"partially_update"`
NotUpdatedFields string `json:"not_updated_fields"`
OrderID int `json:"order_id"`
ShipmentID int `json:"shipment_id"`
NewOrderStatus string `json:"new_order_status"`
OldOrderStatus int `json:"old_order_status"`
AwbCode string `json:"awb_code"`
CourierCompanyID string `json:"courier_company_id"`
CourierName string `json:"courier_name"`
}
type PickupLocationUpdate ¶
type PickupLocationUpdateResponse ¶
type PickupLocationUpdateResponse struct {
Message string `json:"message"`
}
type ShippingAddressUpdate ¶
type ShippingAddressUpdate struct {
OrderID int `json:"order_id"`
ShippingCustomerName string `json:"shipping_customer_name"`
ShippingPhone string `json:"shipping_phone"`
ShippingAddress string `json:"shipping_address"`
ShippingAddress2 string `json:"shipping_address_2"`
ShippingCity string `json:"shipping_city"`
ShippingState string `json:"shipping_state"`
ShippingCountry string `json:"shipping_country"`
ShippingPincode int `json:"shipping_pincode"`
}
type ShippingAddressUpdateResponse ¶
type ShippingAddressUpdateResponse struct {
Message string `json:"message"`
}