Adapt responde codes from API in get and create pdf methods