PIP - Data Export API

DataExport

getPostenInvoicingData

Export Posten invoicing data

Retrieves completed PIP sessions for Posten invoicing purposes. Returns session data including session ID, PIP ID, store number, and completion timestamp. Data can be filtered by completion date to get incremental exports. ## Usage Notes - Maximum 1000 records returned per request - Use the `exportedThrough` field from the response for pagination - Data is ordered by completion timestamp (oldest first) - Only completed sessions are included in the export


/v1/data-export/posten/invoicing

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Bearer [[accessToken]]"\
\
-H "Accept: application/json"\
"https://api.pip.mobai.cloud/v1/data-export/posten/invoicing?completedAfter="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DataExportApi;

import java.io.File;
import java.util.*;

public class DataExportApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();


        // Configure OAuth2 access token for authorization: oauth
        OAuth oauth = (OAuth) defaultClient.getAuthentication("oauth");
        oauth.setAccessToken("YOUR ACCESS TOKEN");

        DataExportApi apiInstance = new DataExportApi();
        Date completedAfter = 2013-10-20T19:20:30+01:00; // Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.

        try {
            PostenExportResponseList result = apiInstance.getPostenInvoicingData(completedAfter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DataExportApi#getPostenInvoicingData");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DataExportApi;

public class DataExportApiExample {

    public static void main(String[] args) {
        DataExportApi apiInstance = new DataExportApi();
        Date completedAfter = 2013-10-20T19:20:30+01:00; // Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.

        try {
            PostenExportResponseList result = apiInstance.getPostenInvoicingData(completedAfter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DataExportApi#getPostenInvoicingData");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure OAuth2 access token for authorization: (authentication scheme: oauth)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
Date *completedAfter = 2013-10-20T19:20:30+01:00; // Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.
 (optional)

DataExportApi *apiInstance = [[DataExportApi alloc] init];

// Export Posten invoicing data
[apiInstance getPostenInvoicingDataWith:completedAfter
              completionHandler: ^(PostenExportResponseList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var PipDataExportApi = require('pip___data_export_api');
var defaultClient = PipDataExportApi.ApiClient.instance;


// Configure OAuth2 access token for authorization: oauth
var oauth = defaultClient.authentications['oauth'];
oauth.accessToken = "YOUR ACCESS TOKEN"

var api = new PipDataExportApi.DataExportApi()
var opts = { 
  'completedAfter': 2013-10-20T19:20:30+01:00 // {{Date}} Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPostenInvoicingData(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPostenInvoicingDataExample
    {
        public void main()
        {

            // Configure OAuth2 access token for authorization: oauth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DataExportApi();
            var completedAfter = 2013-10-20T19:20:30+01:00;  // Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.
 (optional) 

            try
            {
                // Export Posten invoicing data
                PostenExportResponseList result = apiInstance.getPostenInvoicingData(completedAfter);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DataExportApi.getPostenInvoicingData: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\ApiDataExportApi();
$completedAfter = 2013-10-20T19:20:30+01:00; // Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.


try {
    $result = $api_instance->getPostenInvoicingData($completedAfter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DataExportApi->getPostenInvoicingData: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DataExportApi;

# Configure OAuth2 access token for authorization: oauth
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DataExportApi->new();
my $completedAfter = 2013-10-20T19:20:30+01:00; # Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.


eval { 
    my $result = $api_instance->getPostenInvoicingData(completedAfter => $completedAfter);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DataExportApi->getPostenInvoicingData: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DataExportApi()
completedAfter = 2013-10-20T19:20:30+01:00 # Date | Filter sessions completed after this timestamp.
Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z).
If not provided, returns sessions from the beginning.

For incremental exports, use the `exportedThrough` value from the previous response.
 (optional)

try: 
    # Export Posten invoicing data
    api_response = api_instance.get_posten_invoicing_data(completedAfter=completedAfter)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DataExportApi->getPostenInvoicingData: %s\n" % e)

Parameters

Query parameters
Name Description
completedAfter
Date (date-time)
Filter sessions completed after this timestamp. Use ISO 8601 format (e.g. 2023-01-01T12:00:00Z). If not provided, returns sessions from the beginning. For incremental exports, use the `exportedThrough` value from the previous response.

Responses

Status: 200 - Successfully retrieved invoicing data

Status: 400 - Bad Request - Invalid completedAfter parameter format

Status: 401 - Unauthorized - Missing or invalid authentication

Status: 403 - Forbidden - Insufficient permissions for data export

Status: 500 - Internal Server Error