Function Name Output Format Payload Format Base64

CreateSpcJson

TXT

JSON

-

CreateSpcJsonBase64

TXT

JSON

x

CreateSpcCsv

TXT

CSV

-

CreateSpcCsvBase64

TXT

CSV

x

Type Description

Parameters

Input

const char*

The actual data, either as JSON or CSV and possible encoded using Base64. Input type depends on the used function.

OutputBuffer

char *

A buffer initialized by the caller which is used to write the result back in. See also Buffer Sizes

OutputBufferSize

unsigned long *

The size of the OutputBuffer. The library needs it to check if the buffer is large enough to write the result back. After the result is written, it contains the actual data length (actual size <= initial buffer size). See also Buffer Sizes

MessageBuffer

char *

A buffer initialized by the caller which is used to write error messages back to the caller. See also Buffer Sizes

MessageBufferSize

unsigned long *

The size of the MessageBuffer. The library needs it to check if the buffer is large enough to write the result message back. After the message is written, it contains the actual message length (actual size <= initial buffer size). See also Buffer Sizes

Returns

return code

unsigned int

0 = Success 100 = Technical Error 101 = Validation Error 102 = Parse Error

Produces a SPC like the following

SPC
0200
1
CH4431999123000889012
S
Robert Schneider AG
Rue du Lac
1268
2501
Biel
CH







1949.75
CHF
S
Pia-Maria Rutschmann-Schnyder
Grosse Marktgasse
28
9400
Rorschach
CH
QRR
210000000003139471430009017
Instruction of 03.04.2019
EPD
//S1/10/10201409/11/190512/20/1400.000-53/30/106017086/31/180508/32/7.7/40/2:10;0:30
Name AV1: UV;UltraPay005;12345
Name AV2: XY;XYService;54321