Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
ungerik committed Aug 28, 2024
1 parent f966ead commit 52cb1ed
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ the company that is using domonda and who authorized the usage of the data.
```http
POST https://domonda.app/api/public/graphql
Authorization: Bearer API_KEY
Authorization: Bearer ${DOMONDA_API_KEY}
```

Minimal example:

```sh
curl -X POST \
-H "Authorization: Bearer API_KEY" \
-H "Authorization: Bearer ${DOMONDA_API_KEY}" \
-H "Content-Type: application/graphql" \
--data "{ allDocuments{ totalCount } }" \
https://domonda.app/api/public/graphql
Expand Down Expand Up @@ -89,7 +89,7 @@ To request the PDF file for the document with the ID `00000000-0000-0000-0000-00

```sh
curl \
-H "Authorization: Bearer API_KEY" \
-H "Authorization: Bearer ${DOMONDA_API_KEY}" \
--fail \
--remote-name \
https://domonda.app/api/public/document/00000000-0000-0000-0000-000000000000.pdf
Expand Down Expand Up @@ -300,7 +300,7 @@ Example using the CURL command-line tool with a `documentCategory` ID and multip

```sh
curl -X POST \
-H "Authorization: Bearer API_KEY" \
-H "Authorization: Bearer ${DOMONDA_API_KEY}" \
-H "Content-Type: multipart/form-data" \
-F "uuid=01505320-42f7-4cff-a930-4669eeb5e999"
-F "documentCategory=fe110406-e38d-416a-a8d8-29f0a20f1c8d" \
Expand All @@ -316,7 +316,7 @@ Example with `documentType`, `bookingType`, `bookingCategory`, and `waitForExtra

```sh
curl -X POST \
-H "Authorization: Bearer API_KEY" \
-H "Authorization: Bearer ${DOMONDA_API_KEY}" \
-H "Content-Type: multipart/form-data" \
-F "documentType=INCOMING_INVOICE" \
-F "bookingType=CLEARING_ACCOUNT" \
Expand All @@ -333,7 +333,7 @@ and `waitForExtraction`:

```sh
curl -X POST \
-H "Authorization: Bearer API_KEY" \
-H "Authorization: Bearer ${DOMONDA_API_KEY}" \
-H "Content-Type: multipart/form-data" \
-F "documentType=OUTGOING_INVOICE" \
-F "document=@example/invoice.pdf" \
Expand Down
10 changes: 10 additions & 0 deletions golang/domonda/bankaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ type BankAccount struct {
Description nullable.TrimmedString
}

// PostBankAccounts posts the given bankAccounts to the domonda API.
//
// Usage example:
//
// curl -X POST \
// -H "Authorization: Bearer ${DOMONDA_API_KEY}" \
// -H "Content-Type: application/json" \
// --data "[]"" \
// --include \
// https://domonda.app/api/public/masterdata/bank-accounts
func PostBankAccounts(ctx context.Context, apiKey string, bankAccounts []*BankAccount, source string) error {
vals := make(url.Values)
if source != "" {
Expand Down

0 comments on commit 52cb1ed

Please sign in to comment.