Skip to content

Latest commit

 

History

History
307 lines (244 loc) · 10.2 KB

PickupRequestsApi.md

File metadata and controls

307 lines (244 loc) · 10.2 KB

ShipmondoApi.Dotnet.Api.PickupRequestsApi

All URIs are relative to https://app.shipmondo.com/api/public/v3

Method HTTP request Description
PickupRequestsGet GET /pickup_requests List all pickup requests
PickupRequestsPost POST /pickup_requests Create a pickup request
PickupRequestsShow GET /pickup_requests/{id} Retrieve a pickup request

PickupRequestsGet

List<PickupRequestNoShipments> PickupRequestsGet (int? id = null, string carrierCode = null, int? perPage = null, int? page = null)

List all pickup requests

Returns a list of pickup requests.

Example

using System.Collections.Generic;
using System.Diagnostics;
using ShipmondoApi.Dotnet.Api;
using ShipmondoApi.Dotnet.Client;
using ShipmondoApi.Dotnet.Model;

namespace Example
{
    public class PickupRequestsGetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://app.shipmondo.com/api/public/v3";
            // Configure HTTP basic authorization: basicAuth
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new PickupRequestsApi(config);
            var id = 56;  // int? | ID for the pickup request to be included in the filter (optional) 
            var carrierCode = "fed_ex";  // string | Carrier code to be included in the filter. (optional) 
            var perPage = 20;  // int? | For pagination. Defines how many entries are returned per page. (optional)  (default to 20)
            var page = 1;  // int? | For pagination. Defines which page the results are fetched from. (optional)  (default to 1)

            try
            {
                // List all pickup requests
                List<PickupRequestNoShipments> result = apiInstance.PickupRequestsGet(id, carrierCode, perPage, page);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the PickupRequestsGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List all pickup requests
    ApiResponse<List<PickupRequestNoShipments>> response = apiInstance.PickupRequestsGetWithHttpInfo(id, carrierCode, perPage, page);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id int? ID for the pickup request to be included in the filter [optional]
carrierCode string Carrier code to be included in the filter. [optional]
perPage int? For pagination. Defines how many entries are returned per page. [optional] [default to 20]
page int? For pagination. Defines which page the results are fetched from. [optional] [default to 1]

Return type

List<PickupRequestNoShipments>

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful. * X-Current-Page - Pagination - Current Page.
* X-Per-Page - Pagination - Per Page.
* X-Total-Count - Pagination - Total Count.
* X-Total-Pages - Pagination - Total Pages Count.
401 Unauthorized. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PickupRequestsPost

PickupRequest PickupRequestsPost (CreatePickupRequestRequest body)

Create a pickup request

Creates a pickup request and processes the booking at the carrier.

Example

using System.Collections.Generic;
using System.Diagnostics;
using ShipmondoApi.Dotnet.Api;
using ShipmondoApi.Dotnet.Client;
using ShipmondoApi.Dotnet.Model;

namespace Example
{
    public class PickupRequestsPostExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://app.shipmondo.com/api/public/v3";
            // Configure HTTP basic authorization: basicAuth
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new PickupRequestsApi(config);
            var body = new CreatePickupRequestRequest(); // CreatePickupRequestRequest | Pickup Request object<br>

            try
            {
                // Create a pickup request
                PickupRequest result = apiInstance.PickupRequestsPost(body);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsPost: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the PickupRequestsPostWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create a pickup request
    ApiResponse<PickupRequest> response = apiInstance.PickupRequestsPostWithHttpInfo(body);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsPostWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
body CreatePickupRequestRequest Pickup Request object<br>

Return type

PickupRequest

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/pdf, application/json

HTTP response details

Status code Description Response headers
200 Successful. -
401 Unauthorized. -
404 Resource not found. -
422 Invalid or not found parameter(s) -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PickupRequestsShow

PickupRequest PickupRequestsShow (int id)

Retrieve a pickup request

Returns the details of a pickup request.

Example

using System.Collections.Generic;
using System.Diagnostics;
using ShipmondoApi.Dotnet.Api;
using ShipmondoApi.Dotnet.Client;
using ShipmondoApi.Dotnet.Model;

namespace Example
{
    public class PickupRequestsShowExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://app.shipmondo.com/api/public/v3";
            // Configure HTTP basic authorization: basicAuth
            config.Username = "YOUR_USERNAME";
            config.Password = "YOUR_PASSWORD";

            var apiInstance = new PickupRequestsApi(config);
            var id = 56;  // int | ID for the pickup request to be included in the filter

            try
            {
                // Retrieve a pickup request
                PickupRequest result = apiInstance.PickupRequestsShow(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsShow: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the PickupRequestsShowWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Retrieve a pickup request
    ApiResponse<PickupRequest> response = apiInstance.PickupRequestsShowWithHttpInfo(id);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling PickupRequestsApi.PickupRequestsShowWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id int ID for the pickup request to be included in the filter

Return type

PickupRequest

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful. -
401 Unauthorized. -
404 Resource not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]