Skip to content

Instantly share code, notes, and snippets.

@lopex
Created July 3, 2020 20:11
Show Gist options
  • Save lopex/3a470d1443338d37e45042ca4336fd55 to your computer and use it in GitHub Desktop.
Save lopex/3a470d1443338d37e45042ca4336fd55 to your computer and use it in GitHub Desktop.
#!/usr/bin/sh
cat message.xml | \
sed s/_NIP_/jakisnip/ | \
curl -s -d @- -X POST \
-H "Content-Type: text/xml;charset=UTF-8" \
-H "SOAPAction: http://www.mf.gov.pl/uslugiBiznesowe/uslugiDomenowe/AP/WeryfikacjaVAT/2018/03/01/WeryfikacjaVAT/SprawdzNIP" \
https://sprawdz-status-vat.mf.gov.pl | \
xmlstarlet sel \
-N s="http://www.mf.gov.pl/uslugiBiznesowe/uslugiDomenowe/AP/WeryfikacjaVAT/2018/03/01" \
-t -m "//s:WynikOperacji/s:Kod/text()" -c .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment