Discussions

Ask a Question
Back to All

Create and Buy Label API with Sandbox account

When we call https://api.easyship.com/shipment/v1/shipments/create_and_buy_label with the data (see attached) to the sandbox, we got the error "There is not enough credit on your account" but we have already deposited money. Please help to check. Thanks.

[Data sending to EasyShip]
{'origin_country_alpha2': 'HK', 'origin_city': '', 'origin_state': '', 'origin_postal_code': '', 'destination_country_alpha2': 'HK', 'destination_city': 'Quarry Bay', 'destination_state': '', 'destination_postal_code': '', 'destination_address_line_1': 'aaa', 'destination_address_line_2': 'ccc', 'taxes_duties_paid_by': 'Sender', 'is_insured': False, 'nz_delivery_carrier': delivery.carrier(3,), 'platform_order_number': 'WH/OUT/00010', 'destination_name': 'Andy Wai', 'destination_company_name': '', 'destination_phone_number': False, 'destination_email_address': False, 'items': [{'description': '克羅地亞松露蜜糖', 'sku': 'GT01', 'actual_weight': 1.0, 'category': 'dry_food_supplements', 'quantity': 1.0, 'declared_currency': 'HKD', 'declared_customs_value': 118.0}], 'box': {'length': 0, 'width': 0, 'height': 0}, 'total_actual_weight': 0.0, 'selected_courier_id': False, 'buy_label_synchronous': True, 'label': '4x6', 'commercial_invoice': '4x6', 'packing_slip': '4x6', 'format': 'PDF'}

[Response]
{'created_at': '2021-06-30T09:41:39.317Z', 'updated_at': '2021-06-30T09:41:39.621Z', 'order_created_at': None, 'easyship_shipment_id': 'ESHK10078114', 'origin_address': {'id': '2313ec67-df3c-48a2-89ee-b6b285b8c406', 'company_name': 'Shop Croatia', 'contact_name': 'Jutin Chan', 'contact_email': '[email protected]', 'contact_phone': '63601403', 'line_1': 'Room 117, The Merit A3, G/F', 'line_2': 'Merit Industrial Centre', 'postal_code': '', 'city': 'Ma Tau Kok', 'state': None, 'country': {'name': 'Hong Kong'}, 'default_values': {'pickup': True, 'billing': True, 'sender': True, 'return': True}, 'hk_district_id': 63}, 'store_name': 'Odoo', 'set_as_residential': False, 'destination_name': 'Andy Wai', 'destination_company_name': '', 'consignee_tax_id': None, 'destination_address_line_1': 'aaa', 'destination_address_line_2': 'ccc', 'destination_city': 'Quarry Bay', 'destination_state': None, 'destination_postal_code': '0', 'destination_phone_number': 'f', 'destination_email_address': 'f', 'order_notes': None, 'buyer_notes': None, 'seller_notes': None, 'order_tag_list': [], 'platform_order_number': 'WH/OUT/00010', 'platform_name': 'API', 'total_customs_value': 118.0, 'total_actual_weight': 1.0, 'total_dimensional_weight': 0.0, 'total_volumetric_weight': 1.0, 'is_insured': False, 'currency': 'HKD', 'shipment_state': 'created', 'pickup_state': 'not_requested', 'delivery_state': 'not_created', 'label_state': 'not_created', 'warehouse_state': 'none', 'label_response': {'errors': ['There is not enough credit on your account'], 'available_balance': 0.0}, 'origin_country': {'name': 'Hong Kong', 'alpha2': 'HK'}, 'destination_country': {'name': 'Hong Kong', 'alpha2': 'HK'}, 'items': [{'id': '54c31d35-0f3f-49ee-a6de-b9a61dda8299', 'description': '克羅地亞松露蜜糖', 'sku': 'GT01', 'width': None, 'length': None, 'height': None, 'actual_weight': 1.0, 'dimensional_weight': 0.0, 'volumetric_weight': 1.0, 'declared_customs_value': 118.0, 'declared_currency': 'HKD', 'origin_customs_value': 118.0, 'origin_currency': 'HKD', 'category': 'dry_food_supplements', 'quantity': 1}], 'box': {'name': None, 'length': '0.0', 'width': '0.0', 'height': '0.0'}, 'selected_courier': {'id': '64b5d8b2-4c60-4faf-bf1b-9f7b1b7ca1c8', 'name': 'SF Express - Local', 'min_delivery_time': '2', 'max_delivery_time': '3', 'shipment_charge': 22.0, 'fuel_surcharge': 0.0, 'remote_area_surcharge': 0.0, 'oversized_surcharge': 0.0, 'additional_services_surcharge': 0.0, 'residential_full_fee': 0.0, 'residential_discounted_fee': 0.0, 'shipment_charge_total': 22.0, 'warehouse_handling_fee': 0.0, 'insurance_fee': 0.0, 'import_tax_charge': 0.0, 'import_duty_charge': 0.0, 'ddp_handling_fee': 0.0, 'total_charge': 22.0, 'is_above_threshold': False, 'effective_incoterms': 'DDU', 'estimated_import_tax': 0, 'estimated_import_duty': 0, 'courier_does_pickup': None, 'courier_dropoff_url': 'https://htm.sf-express.com/hk/en/dynamic_function/S.F.Network/SF_store_address/', 'available_handover_options': 'dropoff,free_pickup', 'courier_remarks': None, 'payment_recipient': 'Easyship'}, 'rates': [{'courier_id': '64b5d8b2-4c60-4faf-bf1b-9f7b1b7ca1c8', 'courier_name': 'SF Express - Domestic', 'min_delivery_time': 2, 'max_delivery_time': 3, 'value_for_money_rank': 1.0, 'delivery_time_rank': 1.0, 'shipment_charge': 22.0, 'fuel_surcharge': 0.0, 'remote_area_surcharge': 0.0, 'oversized_surcharge': 0.0, 'additional_services_surcharge': 0.0, 'residential_full_fee': 0.0, 'residential_discounted_fee': 0.0, 'shipment_charge_total': 22.0, 'warehouse_handling_fee': 0.0, 'insurance_fee': 0.0, 'sales_tax': 0.0, 'provincial_sales_tax': 0.0, 'ddp_handling_fee': 0.0, 'import_tax_charge': 0.0, 'import_duty_charge': 0.0, 'total_charge': 22.0, 'is_above_threshold': False, 'effective_incoterms': 'DDU', 'estimated_import_tax': 0, 'estimated_import_duty': 0, 'courier_does_pickup': True, 'courier_dropoff_url': 'https://htm.sf-express.com/hk/en/dynamic_function/S.F.Network/SF_store_address/', 'available_handover_options': 'dropoff,free_pickup', 'tracking_rating': 3, 'easyship_rating': 3.7, 'courier_remarks': None, 'payment_recipient': 'Easyship'}, {'courier_id': '3e71bdf7-1aaa-4cbb-b29c-c52829e69419', 'courier_name': 'HK Post - Smart Post', 'min_delivery_time': 2, 'max_delivery_time': 4, 'value_for_money_rank': 2.0, 'delivery_time_rank': 2.0, 'shipment_charge': 28.0, 'fuel_surcharge': 0.0, 'remote_area_surcharge': 0.0, 'oversized_surcharge': 0.0, 'additional_services_surcharge': 0.0, 'residential_full_fee': 0.0, 'residential_discounted_fee': 0.0, 'shipment_charge_total': 28.0, 'warehouse_handling_fee': 0.0, 'insurance_fee': 0.0, 'sales_tax': 0.0, 'provincial_sales_tax': 0.0, 'ddp_handling_fee': 0.0, 'import_tax_charge': 0.0, 'import_duty_charge': 0.0, 'total_charge': 28.0, 'is_above_threshold': False, 'effective_incoterms': 'DDU', 'estimated_import_tax': 0, 'estimated_import_duty': 0, 'courier_does_pickup': False, 'courier_dropoff_url': 'https://www.ec-ship.hk/platform/accept_office.jsp', 'available_handover_options': 'dropoff', 'tracking_rating': 1, 'easyship_rating': 4.3, 'courier_remarks': None, 'payment_recipient': 'Courier'}, {'courier_id': 'd6cfc6d2-3857-4f42-a2a4-9e10ac9766ac', 'courier_name': 'HK Post - Local Parcel', 'min_delivery_time': 2, 'max_delivery_time': 4, 'value_for_money_rank': 3.0, 'delivery_time_rank': 3.0, 'shipment_charge': 75.0, 'fuel_surcharge': 0.0, 'remote_area_surcharge': 0.0, 'oversized_surcharge': 0.0, 'additional_services_surcharge': 0.0, 'residential_full_fee': 0.0, 'residential_discounted_fee': 0.0, 'shipment_charge_total': 75.0, 'warehouse_handling_fee': 0.0, 'insurance_fee': 0.0, 'sales_tax': 0.0, 'provincial_sales_tax': 0.0, 'ddp_handling_fee': 0.0, 'import_tax_charge': 0.0, 'import_duty_charge': 0.0, 'total_charge': 75.0, 'is_above_threshold': False, 'effective_incoterms': 'DDU', 'estimated_import_tax': 0, 'estimated_import_duty': 0, 'courier_does_pickup': False, 'courier_dropoff_url': 'https://www.hongkongpost.hk/en/about_us/network/post_offices/index.html#list', 'available_handover_options': 'dropoff', 'tracking_rating': 1, 'easyship_rating': 4.5, 'courier_remarks': None, 'payment_recipient': 'Courier'}], 'is_merged': False, 'discount': {'code': None, 'amount': 0, 'expires_at': None, 'percentage': None}}