Documentation
¶
Index ¶
- type Config
- type CreateAParcelBody
- type CreateAParcelBodyParcel
- type CreateAParcelBodyShipment
- type CreateAParcelReturn
- type InsertingShipmentsBody
- type InsertingShipmentsBodyCheckoutPayload
- type InsertingShipmentsBodyDeliveryMethodData
- type InsertingShipmentsBodyOrderStatus
- type InsertingShipmentsBodyParcelItems
- type InsertingShipmentsBodyPaymentStatus
- type InsertingShipmentsBodySelectedFunctionalities
- type InsertingShipmentsBodyShippingProduct
- type InsertingShipmentsIntegrationWebhookReturn
- type InsertingShipmentsParcelStatusWebhookReturn
- type InsertingShipmentsReturn
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateAParcelBody ¶
type CreateAParcelBody struct {
Parcel CreateAParcelBodyParcel `json:"parcel"`
}
CreateAParcelBody is to structure the json data
type CreateAParcelBodyParcel ¶
type CreateAParcelBodyParcel struct { Name string `json:"name"` CompanyName string `json:"company_name"` Address string `json:"address"` HouseNumber string `json:"house_number"` City string `json:"city"` PostalCode string `json:"postal_code"` Telephone string `json:"telephone"` RequestLabel bool `json:"request_label"` Email string `json:"email"` Data []interface{} `json:"data,omitempty"` Country string `json:"country"` Shipment CreateAParcelBodyShipment `json:"shipment"` Weight string `json:"weight"` OrderNumber string `json:"order_number"` InsuredValue int `json:"insured_value"` TotalOrderValueCurrency string `json:"total_order_value_currency"` TotalOrderValue string `json:"total_order_value"` Quantity int `json:"quantity"` ShippingMethodCheckoutName string `json:"shipping_method_checkout_name"` }
type CreateAParcelBodyShipment ¶
type CreateAParcelBodyShipment struct {
Id int `json:"id"`
}
type CreateAParcelReturn ¶
type CreateAParcelReturn struct { Parcel struct { Id int `json:"id"` Address string `json:"address"` Address2 string `json:"address_2"` AddressDivided struct { Street string `json:"street"` HouseNumber string `json:"house_number"` } `json:"address_divided"` City string `json:"city"` CompanyName string `json:"company_name"` Country struct { Iso2 string `json:"iso_2"` Iso3 string `json:"iso_3"` Name string `json:"name"` } `json:"country"` Data struct { } `json:"data"` DateCreated string `json:"date_created"` DateAnnounced string `json:"date_announced"` DateUpdated string `json:"date_updated"` Email string `json:"email"` Name string `json:"name"` PostalCode string `json:"postal_code"` Reference string `json:"reference"` Shipment struct { Id int `json:"id"` Name string `json:"name"` } `json:"shipment"` Status struct { Id int `json:"id"` Message string `json:"message"` } `json:"status"` ToServicePoint interface{} `json:"to_service_point"` Telephone string `json:"telephone"` TrackingNumber string `json:"tracking_number"` Weight string `json:"weight"` Label struct { NormalPrinter []string `json:"normal_printer"` LabelPrinter string `json:"label_printer"` } `json:"label"` CustomsDeclaration struct { } `json:"customs_declaration"` OrderNumber string `json:"order_number"` InsuredValue int `json:"insured_value"` TotalInsuredValue int `json:"total_insured_value"` ToState interface{} `json:"to_state"` CustomsInvoiceNr string `json:"customs_invoice_nr"` CustomsShipmentType interface{} `json:"customs_shipment_type"` ParcelItems []interface{} `json:"parcel_items"` Documents []struct { Type string `json:"type"` Size string `json:"size"` Link string `json:"link"` } `json:"documents"` Type string `json:"type"` ShipmentUuid interface{} `json:"shipment_uuid"` ShippingMethod int `json:"shipping_method"` ExternalOrderId string `json:"external_order_id"` ExternalShipmentId string `json:"external_shipment_id"` ExternalReference interface{} `json:"external_reference"` IsReturn bool `json:"is_return"` Note string `json:"note"` ToPostNumber string `json:"to_post_number"` TotalOrderValue string `json:"total_order_value"` TotalOrderValueCurrency string `json:"total_order_value_currency"` ColliTrackingNumber string `json:"colli_tracking_number"` ColliUuid string `json:"colli_uuid"` ColloNr int `json:"collo_nr"` ColloCount int `json:"collo_count"` AwbTrackingNumber interface{} `json:"awb_tracking_number"` BoxNumber interface{} `json:"box_number"` Length interface{} `json:"length"` Width interface{} `json:"width"` Height interface{} `json:"height"` ShippingMethodCheckoutName string `json:"shipping_method_checkout_name"` Carrier struct { Code string `json:"code"` } `json:"carrier"` TrackingUrl string `json:"tracking_url"` } `json:"parcel"` Error struct { Code int `json:"code"` Request string `json:"request"` Message string `json:"message"` } `json:"error,omitempty"` }
CreateAParcelReturn is to decode the json return
func CreateAParcel ¶
func CreateAParcel(body CreateAParcelBody, r Request) (CreateAParcelReturn, error)
CreateAParcel is to create a new parcel
type InsertingShipmentsBody ¶ added in v1.0.4
type InsertingShipmentsBody struct { Address string `json:"address"` Address2 string `json:"address_2"` City string `json:"city"` CompanyName string `json:"company_name"` Country string `json:"country"` CreatedAt string `json:"created_at"` Currency string `json:"currency"` CustomsInvoiceNr string `json:"customs_invoice_nr"` CustomsShipmentType int `json:"customs_shipment_type"` Email string `json:"email"` ExternalOrderId string `json:"external_order_id"` ExternalShipmentId *string `json:"external_shipment_id"` HouseNumber string `json:"house_number"` Name string `json:"name"` OrderNumber string `json:"order_number"` OrderStatus *InsertingShipmentsBodyOrderStatus `json:"order_status"` ParcelItems []InsertingShipmentsBodyParcelItems `json:"parcel_items"` PaymentStatus *InsertingShipmentsBodyPaymentStatus `json:"payment_status"` PostalCode string `json:"postal_code"` SenderAddress int `json:"sender_address,omitempty"` ShippingMethod *int `json:"shipping_method,omitempty"` ShippingMethodCheckoutName string `json:"shipping_method_checkout_name"` Telephone string `json:"telephone"` ToPostNumber string `json:"to_post_number"` ToServicePoint interface{} `json:"to_service_point"` ToState interface{} `json:"to_state"` TotalOrderValue string `json:"total_order_value,omitempty"` UpdatedAt string `json:"updated_at"` Weight string `json:"weight"` Width string `json:"width,omitempty"` Height string `json:"height,omitempty"` Length string `json:"length,omitempty"` Shipments []interface{} `json:"shipments,omitempty"` CheckoutPayload *InsertingShipmentsBodyCheckoutPayload `json:"checkout_payload,omitempty"` }
InsertingShipmentsBody is to structure the data
type InsertingShipmentsBodyCheckoutPayload ¶ added in v1.0.4
type InsertingShipmentsBodyCheckoutPayload struct { SenderAddressId int `json:"sender_address_id"` ShippingProduct InsertingShipmentsBodyShippingProduct `json:"shipping_product"` DeliveryMethodType string `json:"delivery_method_type"` DeliveryMethodData InsertingShipmentsBodyDeliveryMethodData `json:"delivery_method_data"` }
type InsertingShipmentsBodyDeliveryMethodData ¶ added in v1.0.4
type InsertingShipmentsBodyOrderStatus ¶ added in v1.0.4
type InsertingShipmentsBodyParcelItems ¶ added in v1.0.4
type InsertingShipmentsBodyParcelItems struct { Description string `json:"description"` HsCode string `json:"hs_code"` OriginCountry string `json:"origin_country"` ProductId string `json:"product_id"` Properties map[string]interface{} `json:"properties"` Quantity int `json:"quantity"` Sku string `json:"sku"` Value string `json:"value"` Weight string `json:"weight"` }
type InsertingShipmentsBodyPaymentStatus ¶ added in v1.0.4
type InsertingShipmentsBodySelectedFunctionalities ¶ added in v1.0.4
type InsertingShipmentsBodySelectedFunctionalities struct { AgeCheck int `json:"age_check"` LastMile string `json:"last_mile"` FirstMile string `json:"first_mile"` Multicollo bool `json:"multicollo"` FormFactor string `json:"form_factor"` ServiceArea string `json:"service_area"` WeekendDelivery string `json:"weekend_delivery"` DeliveryDeadline string `json:"delivery_deadline"` DirectContractOnly bool `json:"direct_contract_only"` }
type InsertingShipmentsBodyShippingProduct ¶ added in v1.0.4
type InsertingShipmentsBodyShippingProduct struct { Code string `json:"code"` Name string `json:"name"` SelectedFunctionalities InsertingShipmentsBodySelectedFunctionalities `json:"selected_functionalities"` }
type InsertingShipmentsIntegrationWebhookReturn ¶ added in v1.0.8
type InsertingShipmentsIntegrationWebhookReturn struct { Action string `json:"action"` Timestamp int64 `json:"timestamp"` PublicKey string `json:"public_key"` SecretKey string `json:"secret_key"` IntegrationId int `json:"integration_id"` Integration struct { Id int `json:"id"` ShopName string `json:"shop_name"` ShopUrl string `json:"shop_url"` System string `json:"system"` FailingSince interface{} `json:"failing_since"` LastFetch interface{} `json:"last_fetch"` LastUpdatedAt time.Time `json:"last_updated_at"` ServicePointEnabled bool `json:"service_point_enabled"` ServicePointCarriers []interface{} `json:"service_point_carriers"` WebhookActive bool `json:"webhook_active"` WebhookUrl string `json:"webhook_url"` } `json:"integration"` }
InsertingShipmentsIntegrationWebhookReturn is to decode the json data
type InsertingShipmentsParcelStatusWebhookReturn ¶ added in v1.0.8
type InsertingShipmentsParcelStatusWebhookReturn struct { Action string `json:"action"` Parcel struct { Id int `json:"id"` Address string `json:"address"` Address2 string `json:"address_2"` AddressDivided struct { Street string `json:"street"` HouseNumber string `json:"house_number"` } `json:"address_divided"` City string `json:"city"` CompanyName string `json:"company_name"` Country struct { Iso2 string `json:"iso_2"` Iso3 string `json:"iso_3"` Name string `json:"name"` } `json:"country"` Data struct { } `json:"data"` DateCreated string `json:"date_created"` Email string `json:"email"` Name string `json:"name"` PostalCode string `json:"postal_code"` Reference string `json:"reference"` Shipment struct { Id int `json:"id"` Name string `json:"name"` } `json:"shipment"` Status struct { Id int `json:"id"` Message string `json:"message"` } `json:"status"` ToServicePoint interface{} `json:"to_service_point"` Telephone string `json:"telephone"` TrackingNumber string `json:"tracking_number"` Weight string `json:"weight"` Label struct { NormalPrinter []string `json:"normal_printer"` LabelPrinter string `json:"label_printer"` } `json:"label"` CustomsDeclaration struct { } `json:"customs_declaration"` OrderNumber string `json:"order_number"` InsuredValue int `json:"insured_value"` TotalInsuredValue int `json:"total_insured_value"` ToState interface{} `json:"to_state"` CustomsInvoiceNr string `json:"customs_invoice_nr"` CustomsShipmentType interface{} `json:"customs_shipment_type"` ParcelItems []struct { Description string `json:"description"` HsCode string `json:"hs_code"` ProductId string `json:"product_id"` Quantity int `json:"quantity"` Weight string `json:"weight"` Sku string `json:"sku"` ReturnReason interface{} `json:"return_reason"` ReturnMessage interface{} `json:"return_message"` Value string `json:"value"` Properties struct { Size string `json:"Size"` Color string `json:"Color"` Cut string `json:"Cut,omitempty"` } `json:"properties"` } `json:"parcel_items"` Documents []struct { Type string `json:"type"` Size string `json:"size"` Link string `json:"link"` } `json:"documents"` Type string `json:"type"` ShipmentUuid string `json:"shipment_uuid"` ShippingMethod int `json:"shipping_method"` ShippingMethodCheckoutName interface{} `json:"shipping_method_checkout_name"` ExternalOrderId string `json:"external_order_id"` ExternalShipmentId string `json:"external_shipment_id"` ExternalReference interface{} `json:"external_reference"` IsReturn bool `json:"is_return"` Note interface{} `json:"note"` ToPostNumber string `json:"to_post_number"` TotalOrderValue string `json:"total_order_value"` TotalOrderValueCurrency string `json:"total_order_value_currency"` Carrier struct { Code string `json:"code"` Name string `json:"name"` ServicepointsCarrierCode string `json:"servicepoints_carrier_code"` } `json:"carrier"` TrackingUrl string `json:"tracking_url"` DateUpdated string `json:"date_updated"` DateAnnounced string `json:"date_announced"` ColliTrackingNumber string `json:"colli_tracking_number"` ColliUuid string `json:"colli_uuid"` ColloNr int `json:"collo_nr"` ColloCount int `json:"collo_count"` AwbTrackingNumber interface{} `json:"awb_tracking_number"` BoxNumber interface{} `json:"box_number"` Length string `json:"length"` Width string `json:"width"` Height string `json:"height"` TrackTraceNotifications bool `json:"track_trace_notifications"` FromCountry struct { Iso2 string `json:"iso_2"` Iso3 string `json:"iso_3"` Name string `json:"name"` } `json:"from_country"` FromPostalCode string `json:"from_postal_code"` Contract struct { Type string `json:"type"` } `json:"contract"` DateShipped interface{} `json:"date_shipped"` HouseNumber string `json:"house_number"` SuppressedStatuses []interface{} `json:"suppressed_statuses"` ShouldSendFeedback bool `json:"should_send_feedback"` Source string `json:"source"` } `json:"parcel"` Timestamp int64 `json:"timestamp"` }
InsertingShipmentsParcelStatusWebhookReturn is to decode the json data
type InsertingShipmentsReturn ¶ added in v1.0.4
type InsertingShipmentsReturn struct { ExternalOrderId string `json:"external_order_id"` ExternalShipmentId string `json:"external_shipment_id"` ShipmentUuid string `json:"shipment_uuid,omitempty"` Status string `json:"status"` Error struct { Address []string `json:"address"` } `json:"error,omitempty"` }
InsertingShipmentsReturn is to decode the json return
func InsertingShipments ¶ added in v1.0.4
func InsertingShipments(id int, body []InsertingShipmentsBody, r Request) ([]InsertingShipmentsReturn, error)
InsertingShipments is to insert a shipment into an api integration
Click to show internal directories.
Click to hide internal directories.