214 lines
5.6 KiB
YAML
214 lines
5.6 KiB
YAML
openapi: 3.0.3
|
|
|
|
info:
|
|
title: 1&1 Authenticated API
|
|
version: "1.0.0"
|
|
|
|
servers:
|
|
- url: https://auth-proxy.1und1.de/
|
|
description: Live
|
|
|
|
tags:
|
|
- name: Invoices
|
|
description: Invoice related requests
|
|
|
|
components:
|
|
parameters:
|
|
page:
|
|
name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
per_page:
|
|
name: per_page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
interval_from:
|
|
name: interval_from
|
|
description: The start of the date range for which to list invoices.
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date
|
|
interval_to:
|
|
name: interval_to
|
|
description: The end of the date range for which to list invoices.
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
format: date
|
|
schemas:
|
|
Link:
|
|
type: object
|
|
description: Represents a link.
|
|
required:
|
|
- href
|
|
properties:
|
|
href:
|
|
type: string
|
|
description: Hyperlink reference to the linked resource.
|
|
title:
|
|
type: string
|
|
description: Title for the linked resource.
|
|
type:
|
|
type: string
|
|
description: MIME type of the linke resource.
|
|
format: mime
|
|
Invoice:
|
|
type: object
|
|
description: Represents a customer invoice.
|
|
properties:
|
|
links:
|
|
description: Linked resources.
|
|
type: object
|
|
properties:
|
|
self:
|
|
$ref: "#/components/schemas/Link"
|
|
detail:
|
|
$ref: "#/components/schemas/Link"
|
|
faq:
|
|
$ref: "#/components/schemas/Link"
|
|
contract:
|
|
$ref: "#/components/schemas/Link"
|
|
invoice-document:
|
|
$ref: "#/components/schemas/Link"
|
|
type:
|
|
description: Invoice type.
|
|
type: string
|
|
enum:
|
|
- SINGLE
|
|
invoiceId:
|
|
description: Invoice ID.
|
|
type: string
|
|
parts:
|
|
description: Invoice parts.
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- id
|
|
- contractId
|
|
- prouct
|
|
- gross
|
|
- net
|
|
- currency
|
|
- invoicePositions
|
|
properties:
|
|
id:
|
|
description: Invoice part ID.
|
|
type: integer
|
|
format: int64
|
|
contractId:
|
|
description: Contract ID.
|
|
type: integer
|
|
format: int64
|
|
product:
|
|
description: Product name.
|
|
type: string
|
|
gross:
|
|
description: Gross price.
|
|
type: number
|
|
net:
|
|
description: Net price.
|
|
type: number
|
|
currency:
|
|
description: 3 letter currency code as defined by ISO-4217
|
|
type: string
|
|
format: iso-4217
|
|
example: EUR
|
|
# invoicePositions:
|
|
# type: array
|
|
# items:
|
|
# type: any
|
|
responses:
|
|
Error:
|
|
description: Error.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
type: string
|
|
example: 401 Unauthorized
|
|
InvoiceList:
|
|
description: List of invoices.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- links
|
|
- invoice
|
|
properties:
|
|
links:
|
|
description: Linked resources.
|
|
type: object
|
|
properties:
|
|
self:
|
|
$ref: "#/components/schemas/Link"
|
|
next:
|
|
$ref: "#/components/schemas/Link"
|
|
prev:
|
|
$ref: "#/components/schemas/Link"
|
|
aggregations:
|
|
$ref: "#/components/schemas/Link"
|
|
contractaggregations:
|
|
$ref: "#/components/schemas/Link"
|
|
balances:
|
|
$ref: "#/components/schemas/Link"
|
|
invoice:
|
|
type: array
|
|
description: List of found invoices.
|
|
items:
|
|
$ref: "#/components/schemas/Invoice"
|
|
securitySchemes:
|
|
oauth1and1:
|
|
type: oauth2
|
|
description: |
|
|
This API uses 3-legged OAuth.
|
|
flows:
|
|
authorizationCode:
|
|
authorizationUrl: https://auth.1und1.de/1.0/oauth/auth/init
|
|
tokenUrl: https://auth.1und1.de/1.0/oauth/token
|
|
scopes:
|
|
openid: openid
|
|
account_otk: Account OTK
|
|
|
|
security:
|
|
- oauth1and1:
|
|
- openid
|
|
- account_otk
|
|
|
|
paths:
|
|
/mssa/invoices:
|
|
get:
|
|
operationId: getInvoices
|
|
summary: Gets list of customer invoices
|
|
tags:
|
|
- Invoices
|
|
parameters:
|
|
- $ref: "#/components/parameters/page"
|
|
- $ref: "#/components/parameters/per_page"
|
|
responses:
|
|
default:
|
|
$ref: "#/components/responses/Error"
|
|
"200":
|
|
$ref: "#/components/responses/InvoiceList"
|
|
/mssa/invoices;interval={interval_from}_{interval_to}:
|
|
get:
|
|
operationId: getInvoicesInInterval
|
|
summary: Get list of customer invoices for given interval.
|
|
tags:
|
|
- Invoices
|
|
parameters:
|
|
- $ref: "#/components/parameters/interval_from"
|
|
- $ref: "#/components/parameters/interval_to"
|
|
- $ref: "#/components/parameters/page"
|
|
- $ref: "#/components/parameters/per_page"
|
|
responses:
|
|
default:
|
|
$ref: "#/components/responses/Error"
|
|
"200":
|
|
$ref: "#/components/responses/InvoiceList"
|