{"openapi":"3.1.0","info":{"title":"Duito partner-API","version":"1.0.0","description":"Publiser og administrer arrangementene deres i Duito. Dokumentasjon: https://duito.net/hjelp/api. Nøkler lages på https://duito.net/partner."},"servers":[{"url":"https://api.duito.net"}],"security":[{"partnerKey":[]}],"paths":{"/partner/v1/events":{"get":{"operationId":"listEvents","summary":"List arrangementene deres","description":"Nyest oppdatert først. Bruk nextCursor for neste side.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["published","cancelled","merged","hidden"]}},{"name":"updatedSince","in":"query","description":"Bare arrangementer oppdatert etter dette tidspunktet.","schema":{"type":"string","format":"date-time"}},{"name":"seriesId","in":"query","schema":{"type":"string"}},{"name":"venueId","in":"query","schema":{"type":"string"}},{"name":"organizerId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"En side med arrangementer","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":["string","null"]}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"upsertEventWithId","summary":"Opprett eller oppdater (externalId i body)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInputWithId"}}}},"responses":{"200":{"description":"Oppdatert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"201":{"description":"Opprettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fant ikke adressen (GEOCODE_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/events/{externalId}":{"parameters":[{"name":"externalId","in":"path","required":true,"description":"Deres egen ID for arrangementet (URL-kodet).","schema":{"type":"string","minLength":1,"maxLength":200}}],"get":{"operationId":"getEvent","summary":"Hent ett arrangement","responses":{"200":{"description":"Arrangementet slik det ligger i Duito","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent externalId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"upsertEvent","summary":"Opprett eller oppdater","description":"Idempotent: samme forespørsel kan sendes flere ganger. Felter som utelates, nullstilles (pris, billettstatus, tags), unntatt coverImageUrl: utelatt beholder bildet, null fjerner det.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventInput"}}}},"responses":{"200":{"description":"Oppdatert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"201":{"description":"Opprettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fant ikke adressen (GEOCODE_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"cancelEvent","summary":"Avlys","description":"Arrangementet vises som avlyst og de som har meldt seg på får beskjed. Send det på nytt med status scheduled for å gjenopprette.","responses":{"200":{"description":"Avlyst","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent externalId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/events/batch":{"post":{"operationId":"batchUpsertEvents","summary":"Opprett eller oppdater opptil 100 arrangementer","description":"Hvert arrangement lagres for seg: én feil stopper ikke resten. Svaret kommer i samme rekkefølge. Et kall varer høyst ca. 45 s; arrangementer som ikke ble rukket, får BATCH_TIMEOUT og kan sendes på nytt. Samme externalId to ganger gir DUPLICATE_IN_BATCH.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["events"],"properties":{"events":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/EventInputWithId"}}}}}}},"responses":{"200":{"description":"Resultat per arrangement, i samme rekkefølge","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"type":"integer"},"failed":{"type":"integer"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"externalId":{"type":["string","null"]},"result":{"type":"string","enum":["created","updated","error"]},"event":{"$ref":"#/components/schemas/Event"},"error":{"$ref":"#/components/schemas/ErrorBody"}}}}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/me":{"get":{"operationId":"getMe","summary":"Hvem nøkkelen tilhører","responses":{"200":{"description":"Partneren, og om dette er en testnøkkel","content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"type":"string"},"name":{"type":"string"},"test":{"type":"boolean"}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/events/{externalId}/image":{"parameters":[{"name":"externalId","in":"path","required":true,"description":"Deres egen ID for arrangementet (URL-kodet).","schema":{"type":"string","minLength":1,"maxLength":200}}],"put":{"operationId":"uploadEventImage","summary":"Last opp bildet direkte","description":"Send bildet som rå bytes (maks 10 MB). Vi skalerer det og fjerner metadata. Senere oppdateringer uten coverImageUrl beholder bildet.","requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"image/avif":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Arrangementet med det nye bildet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent externalId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Arrangementet er slått sammen med et fra en annen kilde","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Bildet er for stort","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Ikke et bildeformat vi tar imot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/series/{seriesId}":{"parameters":[{"name":"seriesId","in":"path","required":true,"description":"Deres egen ID for serien.","schema":{"type":"string","minLength":1,"maxLength":200}}],"get":{"operationId":"getSeries","summary":"Hent en serie","responses":{"200":{"description":"Alle datoene i serien","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent seriesId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"upsertSeries","summary":"Opprett eller oppdater en serie (opptil 200 datoer)","description":"Hver dato blir et eget arrangement. Datoer som ikke lenger er med, avlyses, og de påmeldte får beskjed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesInput"}}}},"responses":{"200":{"description":"Oppdatert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"201":{"description":"Opprettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"cancelSeries","summary":"Avlys hele serien","responses":{"200":{"description":"Avlyst","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Series"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent seriesId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/venues":{"get":{"operationId":"listVenues","summary":"List stedene deres","responses":{"200":{"description":"Stedene","content":{"application/json":{"schema":{"type":"object","properties":{"venues":{"type":"array","items":{"$ref":"#/components/schemas/Venue"}}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/venues/{venueId}":{"parameters":[{"name":"venueId","in":"path","required":true,"description":"Deres egen ID for stedet.","schema":{"type":"string","minLength":1,"maxLength":200}}],"get":{"operationId":"getVenue","summary":"Hent et sted","responses":{"200":{"description":"Stedet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Venue"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent venueId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"upsertVenue","summary":"Opprett eller oppdater et sted","description":"Flyttes eller omdøpes stedet, oppdateres kommende arrangementer der, og de påmeldte får beskjed om nytt sted.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueInput"}}}},"responses":{"200":{"description":"Oppdatert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Venue"}}}},"201":{"description":"Opprettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Venue"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Fant ikke adressen (GEOCODE_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteVenue","summary":"Slett et sted","description":"Arrangementene beholder stedet de ble lagret med.","responses":{"204":{"description":"Slettet"},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/organizers":{"get":{"operationId":"listOrganizers","summary":"List arrangørene deres","responses":{"200":{"description":"Arrangørene","content":{"application/json":{"schema":{"type":"object","properties":{"organizers":{"type":"array","items":{"$ref":"#/components/schemas/Organizer"}}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/organizers/{organizerId}":{"parameters":[{"name":"organizerId","in":"path","required":true,"description":"Deres egen ID for arrangøren.","schema":{"type":"string","minLength":1,"maxLength":200}}],"get":{"operationId":"getOrganizer","summary":"Hent en arrangør","responses":{"200":{"description":"Arrangøren","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizer"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ukjent organizerId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"upsertOrganizer","summary":"Opprett eller oppdater en arrangør","description":"Navnet vises som arrangør i appen. Endres det, oppdateres kommende arrangementer.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizerInput"}}}},"responses":{"200":{"description":"Oppdatert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizer"}}}},"201":{"description":"Opprettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizer"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteOrganizer","summary":"Slett en arrangør","description":"Arrangementene beholder arrangørnavnet de ble lagret med.","responses":{"204":{"description":"Slettet"},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/webhook":{"get":{"operationId":"getWebhook","summary":"Webhook-oppsettet","responses":{"200":{"description":"Oppsettet og siste status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ingen webhook er satt opp","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setWebhook","summary":"Sett opp eller endre webhook","description":"Signeringsnøkkelen (secret) er bare med i svaret første gang og når rotateSecret er true. Hver leveranse har headeren Duito-Signature: t=<unix-tid>,v1=<hex HMAC-SHA256(secret, \"<t>.<body>\")>.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"200":{"description":"Oppsettet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteWebhook","summary":"Fjern webhook","responses":{"204":{"description":"Fjernet"},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/webhook/test":{"post":{"operationId":"testWebhook","summary":"Send et ping nå","responses":{"200":{"description":"Hvordan det gikk","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/partner/v1/webhook/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"De siste 50 leveransene","responses":{"200":{"description":"Leveransene","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"400":{"description":"Ugyldig forespørsel (VALIDATION_ERROR, INVALID_CATEGORY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Mangler, ugyldig eller tilbaketrukket API-nøkkel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Partnerkontoen venter på godkjenning (PARTNER_PENDING_APPROVAL). Testnøkler virker likevel.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"For mange forespørsler - vent og prøv igjen","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"partnerEvent":{"post":{"operationId":"receiveWebhook","summary":"Varsel fra Duito til webhook-adressen deres","description":"Sjekk Duito-Signature før dere stoler på innholdet, og svar 2xx innen 10 sekunder. Ellers prøver vi igjen etter 1 min, 5 min, 30 min, 2 t og 12 t.","parameters":[{"name":"Duito-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"Duito-Event","in":"header","required":true,"schema":{"type":"string"}},{"name":"Duito-Delivery","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"}}}},"responses":{"200":{"description":"Mottatt"}}}}},"components":{"securitySchemes":{"partnerKey":{"type":"apiKey","in":"header","name":"X-Partner-Api-Key"}},"schemas":{"EventInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"description":"Slug fra GET /categories. Utelatt = vi velger ut fra tittel og beskrivelse.","type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z0-9_]+$"},"location":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["lat","lng","label"],"description":"Koordinater og navnet som vises."},{"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":300,"description":"Gateadresse, f.eks. «Kirkegata 5»."},"postalCode":{"type":"string","pattern":"^\\d{4}$"},"city":{"type":"string","minLength":1,"maxLength":100},"label":{"description":"Navnet som vises, f.eks. stedet eller salen. Standard: adressen.","type":"string","minLength":1,"maxLength":200}},"required":["address"],"description":"Adresse i Norge. Vi finner koordinatene (Kartverket)."},{"type":"object","properties":{"venueId":{"type":"string","minLength":1,"maxLength":200,"description":"ID fra PUT /partner/v1/venues/{venueId}."}},"required":["venueId"],"description":"Et sted dere har registrert. Flytter dere stedet, flyttes kommende arrangementer."}]},"organizerId":{"description":"ID fra PUT /partner/v1/organizers/{organizerId}. Vises som arrangør.","type":"string","minLength":1,"maxLength":200},"coverImageUrl":{"description":"Offentlig bildelenke, som vi kopierer til våre servere. Utelatt = behold bildet som er der (f.eks. lastet opp med PUT .../image). null = fjern bildet.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"ticketUrl":{"type":"string","format":"uri"},"capacity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"price":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Laveste pris i hele kroner."},"max":{"description":"Høyeste pris. Utelatt = «fra min».","type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"default":"NOK","type":"string","pattern":"^[A-Z]{3}$"}},"required":["min"]},"isFree":{"description":"true = gratis. Kan ikke kombineres med price.","type":"boolean"},"ticketStatus":{"type":"string","enum":["available","few_left","sold_out","not_on_sale"],"description":"Billettstatus. Utelatt = ukjent."},"status":{"default":"scheduled","type":"string","enum":["scheduled","cancelled"],"description":"cancelled avlyser arrangementet og varsler de som har meldt seg på."},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["title","location","startsAt"]},"EventInputWithId":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Deres egen ID for arrangementet. Samme ID oppdaterer i stedet for å lage nytt."},"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"description":"Slug fra GET /categories. Utelatt = vi velger ut fra tittel og beskrivelse.","type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z0-9_]+$"},"location":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["lat","lng","label"],"description":"Koordinater og navnet som vises."},{"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":300,"description":"Gateadresse, f.eks. «Kirkegata 5»."},"postalCode":{"type":"string","pattern":"^\\d{4}$"},"city":{"type":"string","minLength":1,"maxLength":100},"label":{"description":"Navnet som vises, f.eks. stedet eller salen. Standard: adressen.","type":"string","minLength":1,"maxLength":200}},"required":["address"],"description":"Adresse i Norge. Vi finner koordinatene (Kartverket)."},{"type":"object","properties":{"venueId":{"type":"string","minLength":1,"maxLength":200,"description":"ID fra PUT /partner/v1/venues/{venueId}."}},"required":["venueId"],"description":"Et sted dere har registrert. Flytter dere stedet, flyttes kommende arrangementer."}]},"organizerId":{"description":"ID fra PUT /partner/v1/organizers/{organizerId}. Vises som arrangør.","type":"string","minLength":1,"maxLength":200},"coverImageUrl":{"description":"Offentlig bildelenke, som vi kopierer til våre servere. Utelatt = behold bildet som er der (f.eks. lastet opp med PUT .../image). null = fjern bildet.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"ticketUrl":{"type":"string","format":"uri"},"capacity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"price":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Laveste pris i hele kroner."},"max":{"description":"Høyeste pris. Utelatt = «fra min».","type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"default":"NOK","type":"string","pattern":"^[A-Z]{3}$"}},"required":["min"]},"isFree":{"description":"true = gratis. Kan ikke kombineres med price.","type":"boolean"},"ticketStatus":{"type":"string","enum":["available","few_left","sold_out","not_on_sale"],"description":"Billettstatus. Utelatt = ukjent."},"status":{"default":"scheduled","type":"string","enum":["scheduled","cancelled"],"description":"cancelled avlyser arrangementet og varsler de som har meldt seg på."},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["externalId","title","location","startsAt"]},"Event":{"type":"object","required":["externalId","id","status","url","title","category","startsAt","location"],"properties":{"externalId":{"type":"string"},"id":{"type":"string","description":"Duitos ID for arrangementet."},"status":{"type":"string","enum":["published","cancelled","merged","hidden"],"description":"published: synlig i Duito. cancelled: avlyst. merged: samme arrangement er allerede publisert av en annen arrangør eller kalenderlenke; deres billettlenke er lagt til der, og endringene deres brukes ikke på det. (Fantes det bare fra en nettside vi henter fra, tar dere det over og får published.) hidden: skjult av Duito (kontakt oss)."},"test":{"type":"boolean","description":"true for arrangementer laget med en testnøkkel. De vises aldri i Duito."},"url":{"type":["string","null"],"format":"uri","description":"Offentlig side for arrangementet. null for testarrangementer."},"seriesId":{"type":["string","null"]},"venueId":{"type":["string","null"]},"organizerId":{"type":["string","null"]},"organizerName":{"type":["string","null"]},"title":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":["string","null"],"format":"date-time"},"location":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"},"label":{"type":"string"}}},"coverImageUrl":{"type":["string","null"],"description":"Vår kopi av bildet når den er laget, ellers lenken dere sendte."},"coverThumbUrl":{"type":["string","null"]},"ticketUrl":{"type":["string","null"]},"capacity":{"type":["integer","null"]},"price":{"type":["object","null"],"properties":{"min":{"type":"integer"},"max":{"type":["integer","null"]},"currency":{"type":"string"}}},"isFree":{"type":["boolean","null"]},"ticketStatus":{"type":["string","null"],"enum":["available","few_left","sold_out","not_on_sale",null]},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"SeriesInput":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":5000},"category":{"description":"Slug fra GET /categories. Utelatt = vi velger ut fra tittel og beskrivelse.","type":"string","minLength":1,"maxLength":50,"pattern":"^[a-z0-9_]+$"},"location":{"anyOf":[{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180},"label":{"type":"string","minLength":1,"maxLength":200}},"required":["lat","lng","label"],"description":"Koordinater og navnet som vises."},{"type":"object","properties":{"address":{"type":"string","minLength":3,"maxLength":300,"description":"Gateadresse, f.eks. «Kirkegata 5»."},"postalCode":{"type":"string","pattern":"^\\d{4}$"},"city":{"type":"string","minLength":1,"maxLength":100},"label":{"description":"Navnet som vises, f.eks. stedet eller salen. Standard: adressen.","type":"string","minLength":1,"maxLength":200}},"required":["address"],"description":"Adresse i Norge. Vi finner koordinatene (Kartverket)."},{"type":"object","properties":{"venueId":{"type":"string","minLength":1,"maxLength":200,"description":"ID fra PUT /partner/v1/venues/{venueId}."}},"required":["venueId"],"description":"Et sted dere har registrert. Flytter dere stedet, flyttes kommende arrangementer."}]},"organizerId":{"description":"ID fra PUT /partner/v1/organizers/{organizerId}. Vises som arrangør.","type":"string","minLength":1,"maxLength":200},"coverImageUrl":{"description":"Offentlig bildelenke, som vi kopierer til våre servere. Utelatt = behold bildet som er der (f.eks. lastet opp med PUT .../image). null = fjern bildet.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"ticketUrl":{"type":"string","format":"uri"},"capacity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"price":{"type":"object","properties":{"min":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Laveste pris i hele kroner."},"max":{"description":"Høyeste pris. Utelatt = «fra min».","type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"default":"NOK","type":"string","pattern":"^[A-Z]{3}$"}},"required":["min"]},"isFree":{"description":"true = gratis. Kan ikke kombineres med price.","type":"boolean"},"ticketStatus":{"type":"string","enum":["available","few_left","sold_out","not_on_sale"],"description":"Billettstatus. Utelatt = ukjent."},"status":{"default":"scheduled","type":"string","enum":["scheduled","cancelled"],"description":"cancelled avlyser arrangementet og varsler de som har meldt seg på."},"dates":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"id":{"description":"Deres egen ID for denne datoen. Med ID kan dere flytte datoen: de påmeldte får beskjed om ny tid i stedet for at den avlyses.","type":"string","minLength":1,"maxLength":100}},"required":["startsAt"]},"description":"Alle datoene i serien. Hver dato blir et eget arrangement i Duito. Datoer som ikke lenger er med, avlyses."}},"required":["title","location","dates"]},"Series":{"type":"object","properties":{"seriesId":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"VenueInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Navnet som vises på arrangementene."},"address":{"type":"string","minLength":3,"maxLength":300},"postalCode":{"type":"string","pattern":"^\\d{4}$"},"city":{"type":"string","minLength":1,"maxLength":100},"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["name"],"description":"Et sted. Med address uten lat/lng finner vi koordinatene (Kartverket)."},"Venue":{"type":"object","properties":{"venueId":{"type":"string"},"name":{"type":"string"},"address":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"lat":{"type":"number"},"lng":{"type":"number"},"eventsUpdated":{"type":"integer","description":"Kommende arrangementer som ble oppdatert (bare ved PUT)."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"OrganizerInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Vises som arrangør i appen."},"url":{"type":"string","format":"uri"}},"required":["name"]},"Organizer":{"type":"object","properties":{"organizerId":{"type":"string"},"name":{"type":"string"},"url":{"type":["string","null"]},"eventsUpdated":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"WebhookInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"https-adressen vi sender varsler til."},"active":{"description":"false = pause varslene. Standard true.","type":"boolean"},"rotateSecret":{"description":"true = lag ny signeringsnøkkel (vises i svaret, bare denne ene gangen).","type":"boolean"}},"required":["url"]},"Webhook":{"type":"object","properties":{"url":{"type":"string"},"active":{"type":"boolean"},"secret":{"type":"string","description":"Bare første gang og ved rotateSecret."},"createdAt":{"type":"string","format":"date-time"},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"lastFailureAt":{"type":["string","null"],"format":"date-time"},"lastError":{"type":["string","null"]},"consecutiveFailures":{"type":"integer"},"events":{"type":"array","items":{"type":"string","enum":["event.hidden","event.restored","event.edited","event.deleted","event.image_failed","partner.approved","partner.unapproved","partner.deactivated","partner.activated","key.revoked","ping"]}}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["event.hidden","event.restored","event.edited","event.deleted","event.image_failed","partner.approved","partner.unapproved","partner.deactivated","partner.activated","key.revoked","ping"]},"createdAt":{"type":"string","format":"date-time"},"attempts":{"type":"integer"},"status":{"type":"string","enum":["delivered","pending","failed"]},"lastStatus":{"type":["integer","null"]},"lastError":{"type":["string","null"]},"nextAttemptAt":{"type":["string","null"],"format":"date-time"}}},"WebhookPayload":{"type":"object","description":"Det vi sender til webhook-adressen deres.","properties":{"id":{"type":"string","description":"Unik per hendelse, for å oppdage duplikater."},"type":{"type":"string","enum":["event.hidden","event.restored","event.edited","event.deleted","event.image_failed","partner.approved","partner.unapproved","partner.deactivated","partner.activated","key.revoked","ping"]},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object","description":"For event.*: externalId og id, pluss reason (event.hidden), changes (event.edited) eller imageUrl og error (event.image_failed)."}}},"ErrorBody":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}}}}}}