Cancel Shipment

Cancel pickup for a shipment.

/shipments/cancel

POST https://api.terminal.africa/v1/shipments/cancel

This endpoint allows you to cancel a shipment before carrier pickup.

Headers

NameTypeDescription

Authorization*

string

Set value to Bearer SECRET_KEY

Content-Type

string

Set value to application/json

Request Body

NameTypeDescription

shipment_id*

string

Unique reference for shipment.

{
    status: true,
    message: 'Shipment canceled successfully.',
    data: {
			address_from: {
				address_id: 'AD-00632494667',	
				city: 'Lagos',
				coordinates: {
						lat: 6.5969424,
						lng: 3.3542992
				},	
				country: 'NGA',
				email: 'augustus_obi@shipmonk.ng',
				first_name: 'Augustus',
				id: 'd799c2679e644279b59fe661ac8fa488',
				is_residential: true,
				last_name: 'Obi',
				line1: '1121 Allen Avenue, Ikeja',
				line2: '',
				metadata: {
					my_app_customer_id: 11234
				},
				name: 'Augustus Obi',
				phone: '+2348122340000',
				state: 'Lagos',
				zip: '121006'			
			},
			address_return: {
				address_id: 'AD-00632494667',	
				city: 'Lagos',
				coordinates: {
						lat: 6.5969424,
						lng: 3.3542992
				},	
				country: 'NGA',
				email: 'augustus_obi@shipmonk.ng',
				first_name: 'Augustus',
				id: 'd799c2679e644279b59fe661ac8fa488',
				is_residential: true,
				last_name: 'Obi',
				line1: '1121 Allen Avenue, Ikeja',
				line2: '',
				metadata: {
					my_app_customer_id: 11234
				},
				name: 'Augustus Obi',
				phone: '+2348122340000',
				state: 'Lagos',
				zip: '121006'		
			},
			address_to: {
				address_id: 'AD-95918335217',	
				city: 'London',
				coordinates: {
						lat: 43.653226,
						lng: -79.3831843
				},	
				country: 'GBR',
				email: 'timothy@shipmonk.ng',
				first_name: 'Timothy',
				id: 'S3YLVnGo9eKpMMbEQcWjgCraLqnNY2Oy',
				is_residential: true,
				last_name: 'Odunubi',
				line1: '45 Greenwich Lane, London',
				line2: '',
				metadata: {
					my_app_customer_id: 10567
				},
				name: 'Timothy Odunubi',
				phone: '+447514022567',
				state: '',
				zip: 'SE5 4HB'		
			},
			events: [{
				created_at: '2021-07-10T02:25:30.421Z',
				description: 'Shipment arranged by Augsustus Obi',
				location: 'Lagos-NG',
				status: 'confirmed'
			},{
				created_at: '2021-07-13T12:45:29.728Z',
				description: 'Pickup canceled by Augustus Obi',
				location: 'Lagos',
				status: 'canceled'
			}],
			id: 'BUbL05Ecprhc2q17Xh9woRSwNpXJehay',
			metadata: {},
			parcel: {
				description: true,
				id: 'Zt4Xh2pbbCmeVcr5YH9lsFHGqoW3i5w3',
				items: [{
					description: 'Shoes purchased from Shipmonk Store',
					name: 'Rubber Boots',
					currency: 'NGN',
					value: 25000',
					weight: 2.5
					quantity: 1
				}],
				metadata: {},		
				packaging: 'LsuiGzcYlz4dKRYnEXeobJu9gnVbQVXN',
				parcel_id: 'PC-25164820699',
				total_weight: 2.51,
				weight: 2.5,
				weight_unit: 'kg'		
			},
			rate: 'bQVMwQZndHbIq6PQD5oiaGWxetLCXGkp',
			shipment_id: 'SH-40208776515',
			status: 'canceled',
			created_at: '2021-07-13T20:25:53.011Z',
			updated_at: '2021-07-13T20:25:53.011Z'			    
    }
}

Last updated